Question
Solve the 2 TODO tags Username: Password: Repeat Password:
Solve the 2 TODO tags
if (isset($_POST["username"])) { $user = $_POST["username"];
// TODO: if the first password field is not blank and it matches the // second password field, insert the new user into the database // (you will need to encrypt the password so that authenticate continues // to work correctly) if (true) {
// TODO insert username and encrypted pwd into the users table
// put the newly registered user's name into the SESSION for later use $_SESSION['user'] = $user;
// forward to the menu header("Location: menu.php"); } else { $msg = "Passwords do not match. Try again. "; } } ?>
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started