Jump to content

How do I adjust length of log in time?


RyanSF07

Recommended Posts

;)

 

Only recently has this begun to happen...  I'm randomly logged off from the site for no apparent reason. It happens so frequently though that something must be causing it, but I haven't found out what, yet.

 

When a user logs in, I start a session - and begin each php page with session_start(). I don't know why the user_id variable is sometimes lost, resulting in "You must log in" message.

 

Any ideas what to look for? an absent session_start() maybe?

 

Thanks,

Ryan

 

//start session
session_start();
header("Cache-control: private"); //IE 6 Fix 

//Register session key with the value
$_SESSION[id] = $row[id];
$_SESSION[name] = "$row[user_name]"; //output success message

$content .= "<h1>Welcome <b>$_SESSION[name]!</b></h1>
<p>You are logged in.</p>";

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.