Posts: 876
Name: Matt Pealing
Location: England, north west
|
I have a script that allows users to become a member of my website, and this piece of code is used to check that there isn't already a user registered in the database with the same email address:
PHP Code:
// check that duplicate email does not exist in tblUser $sql = mysql_query ("SELECT userEmail FROM tblUser WHERE userEmail = '$userEmail'");
if ($sql) { $error[] = 'userEmailDup'; }
The thing is, no matter what email address I type in, even if there is not duplicate in the database... it still produces an error!
I assume that the problem has to be in the code above, am I right?
|