Menu
hi all,
i have written a code in php using sessions.below is the code……
[CODE]
<?php
if(!isset($_SESSION))
{
session_start();
}
$now = time();
$limit = $now;
if(isset($_SESSION[‘last_activity’]) && ($_SESSION[‘last_activity’] < $limit))
{
$_SESSION = array();
header(‘Location:logout.php’);
exit;
}
else
{
//the current time
$_SESSION[‘last_activity’] = $now;
}
?>
.
tell me how to modify in the above code that if the user is entering for first
time then using time() or sessionid it should be stored
or else if he is entering for first time then using current time() or sessionid
it must be stored…..