real_escape_string($_POST['username']); $email = $mysqli->real_escape_string($_POST['email']); $password = md5($_POST['password']); //md5 hashed password $sql= "INSERT INTO users (username, email, password) " . "VALUES ('$username', '$email', '$password')"; //if the query is successful, redirect to welcome.php page and done! if ($mysqli->query($sql) == true) { echo "Registration Successful, redirecting"; header( "refresh:3 url=https://politica123.github.io/index.html" ) } else { echo "User could not be added"; } } else { echo "Both Passwords do not match"; } } ?>

Create an account