I have the following PHP code:
if(!isset($_SESSION)) {
session_destroy();
header('Location: register.php'); //redirect to the orginal form
} else {
$businessOwnerID = $_SESSION['business_owner_id']; //The Business owner ID
$mobileValidation = $_SESSION['mobile_validation'];
}
I am not unserstanding why it isn't redirecting to register.php
I tried destroying all sessions by doing session_destroy(); but it did not work either
var_dump($_SESSION)to see if there's anything in it?isset($_SESSION)would only return false if the session was never started or used previously.