session_start();
// 10 mins in seconds
$inactive = 600;
$session_life = time() - $_session['timeout'];
if($session_life > $inactive)
{ session_destroy(); header("Location: logoutpage.php"); }
S_session['timeout']=time();
amigura
Junior Poster in Training
72 posts since Jan 2008
Reputation Points: 11
Solved Threads: 7
Skill Endorsements: 0
yeah the isset would of helped :$
nice rewrite Rockcreektech apart from $_SESSION needs to be $_SESSION;
amigura
Junior Poster in Training
72 posts since Jan 2008
Reputation Points: 11
Solved Threads: 7
Skill Endorsements: 0
Hi all,
I'm kinda newbie at this. But I was just wondering where are you placing this code? On every page? or just on the main login page, etc? Thanks
Mike
Put it on separate page and include it on every page needed!
Stefano Mtangoo
Senior Poster
3,731 posts since Jun 2007
Reputation Points: 462
Solved Threads: 396
Skill Endorsements: 0
Hi everyone,
I know this is an old post but ....
Start the New thread then. Let the old one die natural death :)
Stefano Mtangoo
Senior Poster
3,731 posts since Jun 2007
Reputation Points: 462
Solved Threads: 396
Skill Endorsements: 0