Update signup redirection to SecurityQuestions.php
parent
8876825ef9
commit
a86c810a2d
|
@ -177,7 +177,14 @@ if (!empty($_POST["form_signup"])) {
|
|||
$_SESSION['user_fullname'] =$_SESSION['user_fullname_temp'];
|
||||
|
||||
if ($con->query($sql) === TRUE) {
|
||||
header("Location: Courses.php");
|
||||
// Get the newly inserted user's ID
|
||||
$user_id = $con->insert_id;
|
||||
|
||||
//Set the user_id in the session
|
||||
$_SESSION['user_id'] = $user_id;
|
||||
|
||||
//Redirect to SecurityQuestions.php
|
||||
header("Location: SecurityQuestions.php");
|
||||
} else {
|
||||
echo "Something really bad (SQL insertion error) happened during sign up.";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue