hi friends ,
i made a login page, and i made a logout button too, but i want to make a timed logout, i mean after 5 min for example the user is logout automatically.(i.e i should log out from inactive web page after 5 mins)
need source code or suggestions for this task
source code for loging out:
<?php
session_start();
unset($_SESSION['user']);
if (isset($_COOKIE[session_name()])) {
setcookie(session_name(), '', time()-42000, '/');
}
$_SESSION = NULL;
$_SESSION['user']=NULL;
session_destroy();
header("Location: index.php");
?>