Jump to content

Recommended Posts

I've never actually done a username password,  retrieval script before so need a little help. In the profile form the user is submitting username/password/name/email etc. into a MySQL DB along with a security question and answer. Is it just a matter of creating a form which does a check against the database and sends out an email to the user with their password? The password is hashed with MD5, so how would I send out an un-hashed PW?

 

thanks!

Link to comment
https://forums.phpfreaks.com/topic/221136-lost-usernamepassword-script/
Share on other sites

I've never actually done a username password,  retrieval script before so need a little help. In the profile form the user is submitting username/password/name/email etc. into a MySQL DB along with a security question and answer. Is it just a matter of creating a form which does a check against the database and sends out an email to the user with their password? The password is hashed with MD5, so how would I send out an un-hashed PW?

 

thanks!

 

Hashing is one-way so you can't unhash it.  You would need to generate a new password, update the db and then send them the new password.

Present a form that asks for the username or email, and when submitted, query the database for the security questions.  Present a form with the security questions, and when submitted, query the db for the answers for the specific user.  If they match then generate some random password, md5 it and update the db.  Then just send them the newly generated (not md5) password.

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.