Answers for "if session exists"

PHP
1

check if session variable exists php

if (isset($_SESSION['errors']))
{
    //Do stuff
}
Posted by: Guest on May-06-2020
6

check if session is set

if (isset($_SESSION["userid"])) {
	echo "Logged in";
} else {
	echo "Not Logged in";
}
Posted by: Guest on September-04-2021

Code answers related to "if session exists"

Browse Popular Code Answers by Language