hi there. easy auto logout PHP page.
1) insert the following code in the scripts that you want.
1) insert the following code in the scripts that you want.
$inactive = 5; // Set timeout period in seconds
if (isset($_SESSION['timeout']))
{
$session_life = time() - $_SESSION['timeout'];
if ($session_life > $inactive)
{
session_destroy();
LATER please add the following javascript....using
echo "" i cant write it out.else it will effect my blog T_T
also please put header refresh function to refresh your page
alert('YOUhavebeenloggedout')
window.location = ""
}
}
$_SESSION['timeout'] = time();

Comments
Post a Comment