mitzleah Posted November 12, 2006 Share Posted November 12, 2006 I already seen some tutorials about it, downloaded the files and tried it. But it seems it's not working at all. :(Username and password were set to cookies. I wonder how could the usename and password textfield will remember set cookies???Please help here!Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/26981-remember-me-login-feature/ Share on other sites More sharing options...
printf Posted November 12, 2006 Share Posted November 12, 2006 most times you create reference hash, then add that hash to the cookie. Then when the user visits, you check for the cookie, then look in your session table or the table that holds the [b]remember me hash[/b], then take the username and password from that rows to continue the session or auto login them in by starting a new session with their information that is referenced by the [b]remember me hash[/b]. Link to comment https://forums.phpfreaks.com/topic/26981-remember-me-login-feature/#findComment-123374 Share on other sites More sharing options...
mitzleah Posted November 12, 2006 Author Share Posted November 12, 2006 how to put the cookie values to username and password textfield? Link to comment https://forums.phpfreaks.com/topic/26981-remember-me-login-feature/#findComment-123376 Share on other sites More sharing options...
printf Posted November 12, 2006 Share Posted November 12, 2006 use setcookie() or set a raw cookie using header('Set-Cookie:...) when the login is completed and valid. Then check for the cookie when loading the login form, if it's set, load those cookie values into the form! If you want an example show me your login code. Link to comment https://forums.phpfreaks.com/topic/26981-remember-me-login-feature/#findComment-123380 Share on other sites More sharing options...
mitzleah Posted November 13, 2006 Author Share Posted November 13, 2006 the form used to remember cookies that were set... the problem now is even when the input text username and password were empty, I was able to login via submitting it... weird!As far as security issue is concern... putting a value to it is unsecured. eg. <input type="textfield" name="uname" value="<?= $_COOKIE['uname'] ?>"> as well as in password.My question is: HOW COULD I BE ABLE TO PUT SET COOKIES OR MAKE IT VISIBLE TO THE FORM (USERNAME AND PASSWORD INPUT TEXT)??? Link to comment https://forums.phpfreaks.com/topic/26981-remember-me-login-feature/#findComment-123714 Share on other sites More sharing options...
mitzleah Posted November 13, 2006 Author Share Posted November 13, 2006 Knock! Knock! Link to comment https://forums.phpfreaks.com/topic/26981-remember-me-login-feature/#findComment-123734 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.