sessions how to check for inactivity
Posted: Sun May 16, 2010 8:15 am
guys ,
i use this piece of code to check if the page is active , i put it in every page in my project , in a case it has failed , why ?
should i use
when the page is active all the variables is lost isn't it so the first case should work ?
i use this piece of code to check if the page is active , i put it in every page in my project , in a case it has failed , why ?
Code: Select all
session_start();
if( !$_SESSION['UserToProcess'] )
{header("Location: logout.php");}
Code: Select all
session_start();
if( isset($_SESSION['UserToProcess']) )
{header("Location: logout.php");}