Thanks for continued support on this Jason. I posted a reply yesterday but didn't see it show up today. Not sure what happened but here's the gist of the reply from yesterday:
The suggestion you gave (with code) in an earlier reply works for checking if the email address (userID) exists in our database and displaying an error message if not. Your code example handles this fine.
My question is, how do I use a single page to handle the conditions I've outlined before?
Here are the basic steps I need to have accomplished:
1. User enters their email address (userID) which is checked to see if it exists in our records. If not, I'll display an error message.
2. Based on the email address they successfully submitted, I need to retrieve their secret question as a prompt so they can enter their secret answer.
3. The user enters their secret answer and I compare their secret answer to what exists in our database.
4. If the secret answer matches, I generate a new password, encrypt it and save it in the database based on their email address.
5. I send them an email with the unencrypted password so they can log in. I encrypt their password for SHA-1 when they login so it can successfully compare to the encrypted password stored in the database for the user.
My question is, how is this done on one page given that they had to enter their email address and click submit, then I had to retrieve their secret question (based on their email address they submitted) which is stored in the database, they had to enter their secret answer, and then they had to submit that as well?
In other words, how are two form submittals being handled on the same page while I had to know their email address to retrieve their secret question and display it so that they could enter their secret answer and submit it too?
I'm asking this question because you thought this entire process could be handled on one page.
steve