Well, I’m trying to make a $_SESSION last for 24 hours.
When users login and are inactivate for 30mins they automatically log out.
The session is $_SESSION[“user”]; how could I make it last 24 hours.
Well, I’m trying to make a $_SESSION last for 24 hours.
When users login and are inactivate for 30mins they automatically log out.
The session is $_SESSION[“user”]; how could I make it last 24 hours.
you need to make a $_SESSION[‘time’], then on each page do some like
[php]$_SESSION[‘time’] = time();[/php]
So every time a user does an action on the page it will reup the session time.
Next you have to have something like
if(!$_SESSION[‘user’]){ echo"";}
if(time()-$_SESSION[‘time’]>1800){
unset($_SESSION[“user”]);
echo"";
}