Jump to content

Remember Me! checkbox with cookies


MasterACE14

Recommended Posts

Evening people,

 

I have a login page on my website, and thats working fine, I have 3 input boxes, username, password and e-mail. And I have a check box called "Remember Me" which I want to create a cookie, so the next time a person comes to log into my website they don't have to type in their username, password and e-mail again. I have no idea how to do this, But I do know how to create cookies.

 

Regards ACE

 

 

Link to comment
Share on other sites

you need to set the cookie like you said you know how to. then what you want to be doing is testing on the login page whether that cookie has been set - so call to the cookie:

 

$cookieusername = $_COOKIE['username'];

$cookiepassword = $_COOKIE['password'];

 

then pass these two (cookieusername and cookiepassword) into your login tester and if they work then the person is logged in. Not a highly secure way of doing business mind you...never store a password in a cookie, unless its a home project with nothing big in mind, and md5() your passwords anyway...at the least!

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.