how to check session exist or not in php code example Example: check if session variable exists php if (isset($_SESSION['errors'])) { //Do stuff }