when ever a user login, his information(name,password..etc) will be stored in sessions and also stored in users table.
the table has following fields
1.userid 2.password
i would like to add session expiry time
what i want to do is if a user login and does not do any thing for next 15 minutes i want to redirect the user to login page.
how i can do this.any of your help will be appreciated
thanks..
to add session expiry time
Moderator: General Moderators
Re: to add session expiry time
Code: Select all
$inactive = 600;
if(isset($_SESSION['<strong class="highlight">timeout</strong>']) )
{
$session_life = time() - $_SESSION['start'];
if($session_life > $inactive)
{ session_destroy(); header("Location: loginpage.php"); }
}
$_SESSION['<strong class="highlight">timeout</strong>'] = time();Re: to add session expiry time
somebody pls give me a solution...........
any help will be appreciated..
any help will be appreciated..