mikefrederick Posted August 6, 2008 Share Posted August 6, 2008 I am building a site where users need to be able to reset there passwords. The passwords are stored as md5, and when they click 'reset password' an action is run to grab a random string and set that as the password. The problem is that when they click reload on the page that the script forwards to, the script is run through again and so the password is changed again. Right now, I am taking the random string and using base64_encode and putting it in the URL. I wish I could just grab the password from the database, but that's not possible with md5. What's a good way to handle this? Quote Link to comment https://forums.phpfreaks.com/topic/118474-help-resetting-md5-password/ Share on other sites More sharing options...
lemmin Posted August 6, 2008 Share Posted August 6, 2008 If you put your php code in its own file and forward to a page to show content instead of outputting with that script, refreshing wouldn't run the code again. Quote Link to comment https://forums.phpfreaks.com/topic/118474-help-resetting-md5-password/#findComment-609894 Share on other sites More sharing options...
Jabop Posted August 6, 2008 Share Posted August 6, 2008 You could and should do what the previous person suggested, or you could do small checks with session vars. Quote Link to comment https://forums.phpfreaks.com/topic/118474-help-resetting-md5-password/#findComment-609906 Share on other sites More sharing options...
mikefrederick Posted August 6, 2008 Author Share Posted August 6, 2008 yeah i know, but in FF3 it actually was doing that. this was right after it came out, i am going to test it again. Quote Link to comment https://forums.phpfreaks.com/topic/118474-help-resetting-md5-password/#findComment-609908 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.