checking session if is empty php code example
Example: check if session empty
session_start();
if(!empty($_SESSION['mySession'])){
//session is not empty
}
else{
//empty
}
session_start();
if(!empty($_SESSION['mySession'])){
//session is not empty
}
else{
//empty
}