As being new to this,i am trying to implement a session timeout after 100 seconds if a user does not click on "any other links" i.e stays on that page without any activity..i used the following php script but i guess the "if" condition check is done only once per script and so the automatic redirection would not occur even if the check gets violated after sometime..so is there a way(using only php script) so that this time check occurs repeatedly on the page??
if (isset($_SESSION['LAST_ACTIVITY']) and (time() - $_SESSION['LAST_ACTIVITY'] > 100))
{
session_unset();
session_destroy();
header('Location: seesiontimeout.php');
}
the $_SESSION['LAST_ACTIVITY'] variable has been set at starting of script...
$_SESSION['LAST_ACTIVITY']