This is probably a MySQL question as much as it is a PHP question but mostly it is just a logic question.
Okay, here it is...I have a site with many password protected pages. When a new user is added, their password is hashed and stored in the database using the PASSWORD() function.
...WHERE password = PASSWORD($password);
Then when the user logs in, we compare the hashed value of what they submitted in the password field with the hashed value stored in the database. This seems pretty smart and pretty secure as no actual passwords are stored in the database.
Now, my real question is, how does one develop a password recovery system (i.e. user has forgotten his password and needs it emailed to them) while this logic is in place? It doesn't look like I can decode the hashed password in the database. Do I need to start from scatch with how I deal with passwords?
I appreciate any and all input on this