Code: Select all
$_SESSION['timeout']=time()+30;Code: Select all
$timenow = time();
if ($timenow>$timeout)
{
session_unset();
session_destroy();
print "not logged in";
print "<script>";
print " self.location='login.php';";
print "</script>";
}
else
{
print "logged in";
echo "Current Time".$timenow."\n";
echo "Timeout". $timeout."\n";
---rest of the page---thanks for your help, y'all