Username/password is incorrect."; } } } // A function to register a new user function register () { if (isset($_REQUEST['username'])) { global $con; /* assign the variables with data from the login form */ // removes backslashes $username = stripslashes($_REQUEST['username']); //escapes special characters in a string $username = mysqli_real_escape_string($con,$username); $email = stripslashes($_REQUEST['email']); $email = mysqli_real_escape_string($con,$email); $password = stripslashes($_REQUEST['password']); $password = mysqli_real_escape_string($con,$password); /* create a new user entry inside the database */ $query = "INSERT into users (userLogin, userPass, userEmail) VALUES ('$username', '$password', '$email')"; $result = mysqli_query($con,$query); /* tell the user if the username or the email address are already present in the database based on the return code of the database*/ if ($result) { echo "
"; } elseif (mysqli_errno($con) == 1062) { echo "";
echo "" . $row['demandTitle'] . "" . "
";
echo $row['date'] . "
";
//add a delete button to the demand output
echo "