This is part of my code for login, I would like to logout users after 15 minutes, of inactivity ofcourse. Could you please advice me what to change, because im newbe to PHP…
if ($rememberme)
{
setcookie ('USSUID', $_SESSION['uid'], time () + 60 * 60 * 24 * 365);
setcookie ('USSPW', $_SESSION['upw'], time () + 60 * 60 * 24 * 365);
}
The relevant part to your solution is in the third parameter of setcookie. There you have to fill in the time when you want to let your cookie expire.
You have to change (1 year)
to (15 minutes)
That’s it.