Jump to content

Keeping a user logged in with sessions


Pi_Mastuh

Recommended Posts

When the user logs in on my site it uses

 

   session_start();

   session_register('preuserName');
   session_register('preuserID');

   $session=session_id();
   
   	mysql_query("UPDATE chibifriends SET userLastLogin = '$today' WHERE preuserID = '$preuserID'");

to log them in. How would I make the sessions not expire and when they go to the site (index.php) re-direct to another page if they're logged in?

Link to comment
https://forums.phpfreaks.com/topic/38959-keeping-a-user-logged-in-with-sessions/
Share on other sites

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.