how to check session is empty or not in 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
}