Jump to content

[SOLVED] Remember a login


jaymc

Recommended Posts

Whats the best way to remember if a user is logged in

 

I use sessions at the moment, but Ive had to set the session.cookie_lifetime to an obscene number to prevent the cookie from being deleted upon browser close

 

I want to do it the proper way

 

What is the standard?

Link to comment
https://forums.phpfreaks.com/topic/86368-solved-remember-a-login/
Share on other sites

Session cookie isn't the same as a Cookie.  As soon as you close the browser, the browser will pick up a new session if they come back.  I am not sure what you gain by not clearing it except allowing people more time to try and hack the session id.

 

Use a Cookie if you want to log them in upon return.

 

Whats the best way to remember if a user is logged in

 

I use sessions at the moment, but Ive had to set the session.cookie_lifetime to an obscene number to prevent the cookie from being deleted upon browser close

 

I want to do it the proper way

 

What is the standard?

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.