Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // define variables and set to empty values
- $nameErr = $emailErr = $cognomeErr = $passwordErr = $cpasswordErr = "";
- $name = $email = $cognome = $username = $password = $cpassword = "";
- if ($_SERVER["REQUEST_METHOD"] == "POST") {
- if (empty($_POST["name"])) {
- $nameErr = "Name is required";
- } else {
- $name = test_input($_POST["name"]);
- }
- if (empty($_POST["email"])) {
- $emailErr = "Email is required";
- } else {
- $email = test_input($_POST["email"]);
- }
- if (empty($_POST["cognome"])) {
- $cognomeErr = "cognome is required";
- } else {
- $cognome = test_input($_POST["cognome"]);
- }
- if (empty($_POST["username"])) {
- $usernameErr = "username is required";
- } else {
- $username = test_input($_POST["username"]);
- }
- if (empty($_POST["password"])) {
- $passwordErr = "password is required";
- } else {
- $password = test_input($_POST["password"]);
- }
- if (empty($_POST["cpassword"])) {
- $cpasswordErr = "confirm password is required";
- } else {
- $cpassword = test_input($_POST["cpassword"]);
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement