MasterACE14 Posted September 27, 2007 Share Posted September 27, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/70882-remember-me-checkbox-with-cookies/ Share on other sites More sharing options...
black.horizons Posted September 27, 2007 Share Posted September 27, 2007 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! Quote Link to comment https://forums.phpfreaks.com/topic/70882-remember-me-checkbox-with-cookies/#findComment-356316 Share on other sites More sharing options...
MasterACE14 Posted September 27, 2007 Author Share Posted September 27, 2007 ok, Thankyou Quote Link to comment https://forums.phpfreaks.com/topic/70882-remember-me-checkbox-with-cookies/#findComment-356317 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.