MYSQL Select Qurey Help Needed..
Posted: Fri Mar 27, 2009 11:53 pm
hii..
i'm developing a php forgot password script with the below 4 steps in which i need to validate userid from one table and user's addresses from other table.
i've 2 tables in my DB customers and customer_addresses.
in the first form i'm validating the form input with user ID.
my code for first form:
secondly i've to check those user's firstname, lastname, state and zip code with another table.
heres my code:
my problem is, when i input user say "MYSQL" and if tht exist in customers tanle then i can see the second form, there if i enters firstname, lastname, state and zip of other user that is in DB i'm getting success page, i need to validate the second form's input with user "MYSQL" only.
can anyone please help me out..
awaiting ur reply's
many thanks,
i'm developing a php forgot password script with the below 4 steps in which i need to validate userid from one table and user's addresses from other table.
i've 2 tables in my DB customers and customer_addresses.
in the first form i'm validating the form input with user ID.
my code for first form:
Code: Select all
$query="SELECT customerID FROM ss_customers WHERE Login='" . mysql_real_escape_string($Login) . "'";heres my code:
Code: Select all
$query="SELECT customerID FROM ss_customer_addresses WHERE first_name='" . mysql_real_escape_string($first_name) . "' and last_name='" . mysql_real_escape_string($last_name) . "' and state='" . mysql_real_escape_string($state) . "' and zip='" . mysql_real_escape_string($zip) . "'";can anyone please help me out..
awaiting ur reply's
many thanks,