I have a
In your And else, instead of checking the value of a $_SESSION and determining the value of it, you can use the following: Other options are storing variables in a I hope this has helped you out
else statement you haven't defined a session_start() like you did in your if statement.if (session_status() == PHP_SESSION_NONE) {
//Do something if the session is not existing
}
$_COOKIE and then check if it isset or not(if(isset($_COOKIE["username"]){})