I need to make a WHERE condition that ask for two conditions
$sql= "SELECT fname, lname FROM user WHERE creditcard = '$creditcard' and creit = '$credit' ";
but it doesn't work, it gives me an error, eny help? thanks.
What error do you get? What is the rest of your code?
Do the fields creditcard an creit exist? Are the vars $creditcard and $credit set? Does the code work, when you delete
and creit = '$credit'
Yeah, my guess would be
and creit = '$credit' ";
should be
and credit = '$credit' ";
Also for any future mysql problems, print your query string then add mysql_error when you execute it. These two ways will help you solve any mysql problems easily.
Cgraz