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. "; } } ?>

Username: Password: Repeat Password:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!