Hi,
I have a 'retrieve password' form but the password is held in a different table to the email address. So the user enters their email address and my script does a query to find their ID from their email address. Then I have a second query which looks up their username and password with the ID from the first query - but it won't work for me. Am I missing something in between?
This bit finds the ID:
$query_rsGetuser = "SELECT ID FROM tbl_clients WHERE email = '$POST[email]'";
$rsGetuser = mysql_query($query_rsGetuser, $myconn);
Grand -this gives me the ID
Now I run the query to find the username and password in the other table:
$query_rsGetlogin = "SELECT username, password FROM client_details WHERE clientid = '$ID'"; //the ID from the previous query
$rsGetlogin = mysql_query($query_rsGetlogin, $myconn)
Then mail the results...
but the email arrives with empty variables and I don't know why 😕
Can anybody help?
Thank you...