how to check how many session variables are exist server code example Example: check if session variable exists php if (isset($_SESSION['errors'])) { //Do stuff }