I think $_SESSION is a dictionary, (at least that’s what I’d call it in Python). The key is in [‘key’], the value is assigned, like:
$_SESSION[‘loginerror’] = ‘No account associated with this email’;
I think I can make up my own keys. I have for example:
$_SESSION[‘email’] = $email;
$_SESSION[‘password’] = $password;
Question: Is $_SESSION[‘success’] a fixed key??
When I changed this to $_SESSION[‘loginsuccess’], the user was verified, I see the message ‘User verification successful’ on the login page, but I did not proceed to the target webpage. Change it back to $_SESSION[‘success’] = “something” and I go to the target webpage
if(password_verify($password, $user['password'])){
//action after a successful login
//for now just message a successful login
$_SESSION['success'] = 'User verification successful';
// include statement works, location statement does not work WHY??
//header('location: 19BEsW13.html.php');
include 'NE_EAP2_IRexam.html.php';
exit();
}