I need to check if a person has already registered. I want to check 2 things, the first and last name. They are seperate, so, how do i check if they are both on the same row?
"select count(last_name) from table where first_name = $firstname and last_name = $lastname"
if result is > 0 they are there
but what about John Smith - could be more than one of those
hmm, i cant get it to work....
$result = mysql_query("select count(lastname) from reg where firstname = $firstname and lastname = $lastname"); if ($result) { echo ("That name has already been registered."); exit(); }