remember me function

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


I need to create a "remember me" type function where the user can
check mark upon logging in so that they don't have to input their
information again when they visit. I'm not quite sure on the best way
to go about this. I have some ideas on how to go about this, but they
all seem overly complicated. So I wanted to pool some ideas on how to
do this? I'm looking for something simple that I can implement on a

Just to let you know, there is an existing login system already. I
imagine I just need to find where the cookie is set and extend the
time to forever when a person clicks on remember me. Is that it?

Kind Regards,


Re: remember me function

Risend wrote:
Quoted text here. Click to load it

This is typically implemented by storing a cookie on the user's system,
then checking for the cookie.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: remember me function

Quoted text here. Click to load it

If there is no "remember me" function today there might not be any cookie
there yet. The http protocol has a standard for sending username and
password encrypted whith rot13 (which is almost plaintext unless over
https). So without knowing how your current login system is working I
would guess it is rather likely it doesn't use cookies for this purpose

regards Henrik
The address in the header is only to prevent spam. My real address is:
hc3(at) Examples of addresses which go to spammers:
root@localhost postmaster@localhost

Re: remember me function

Risend escribió:
Quoted text here. Click to load it

The login system probably uses sessions and it's not a good idea to try
to keep the session alive forever. Instead, you can create a long random
ID and store it both in server (DB) and client (cookie). Then you need
to modify the login system so it performs two task:

1. When credentials are required, check if the random IDs exists and
matches the value in DB: if so, generate the appropriate credentials.

2. When user logs in manually and selects the "Remember Me" checkbox,
create the autologin ID.

You can add additional features: an expiration date, some extra
restrictions like client IP, a hash to validate the ID, etc.

-- - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:
-- Mi web de humor satinado:

Site Timeline