Answers for "check if a session is set php"

PHP
1

check if session variable exists php

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

php check if session is running

<?php
if(session_status() == PHP_SESSION_ACTIVE){
    //a session is already running
    session_destroy(); //stops the session
}
?>
Posted by: Guest on March-01-2021

Code answers related to "check if a session is set php"

Browse Popular Code Answers by Language