chxxangie
Nov 20th 2007, 9:52 pm
session_start();
ini_set("session.gc_maxlifetime", "10"); //in second
if(isset($_SESSION['active'])){
}else{
session_unset();
session_destroy();
?>
<SCRIPT LANGUAGE="Javascript">
alert ('Your sesion has expired.\nPlease login again!');
document.location = "login.php"
</SCRIPT>
<?php
exit;
}
?>
i want to destroy the session if the user do not have respone in a period of the time.
i search from internet is the above code.
but when i trying it doesn't work?
do i miss something or...???
ini_set("session.gc_maxlifetime", "10"); //in second
if(isset($_SESSION['active'])){
}else{
session_unset();
session_destroy();
?>
<SCRIPT LANGUAGE="Javascript">
alert ('Your sesion has expired.\nPlease login again!');
document.location = "login.php"
</SCRIPT>
<?php
exit;
}
?>
i want to destroy the session if the user do not have respone in a period of the time.
i search from internet is the above code.
but when i trying it doesn't work?
do i miss something or...???