We help IT Professionals succeed at work.

What's the best way to implement the 'Remember Me' functionality in PHP?

Quincy2oneOh
Quincy2oneOh asked
on
Hi,

I've been asked to do a 'Remember Me' similar to Yahoo! where they keep you logged in for 2 weeks.  What would be the best way to implement this?

My boss doesn't want our clients to have to log in 'all the time' he wants them to point their browser to our application and have them go directly to their own private account.
Comment
Watch Question

Commented:
use cookies.

when the user authenticates, have it write a cookie with the users ID.

then have each page check for this cookie, if the cookie exists then it will give them the authentication needed.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.