I'm trying to write a 'Forgot Password' script that will, in the end, send the user their password to their registered email address. So far this is how I have it setup (mind you it could probably be done much better.. but I'm still learning), I have 2 tables.. members and reminders. Members has all the basic user info.. reminders is made up of Username, email, password (all 3 from the members table), reminderquestion and reminderanswer.
The Forgot Password page basically works like this, you type in your username and email address, using PHP SELF it reloads the page, does some checks, and if there's a match in the reminders table it displays the reminderquestion and a field to enter the reminder answer. This is where I'm having a problem.. I think once the user hits submit again, the variables from the first form (their username and email address) are reset so I can't use it in my query with the reminderanswer. I basically want to match the reminder answer with either their username or email address..
So is there anyway to pass variables through multiple forms (if that makes sense)? Or should I try doing this with Sessions.. so confused. Thanks for any ideas, if you need more info/some code.. I'll be glad to post.
brokeDUstudent