SQL query that is always true?
Posted: Tue Mar 04, 2008 8:47 am
I have this query to find out whether the email address the user typed in, already exists in the database.
if($res=mysql_query("SELECT address FROM email WHERE address ='{$new_emailaddress}'") <>FALSE) {
echo "This email address already exists . Enter a new one.";}
the problem is, the query always returns true. But I want to compare it to the email address the user enters.
Can anyone help me?
if($res=mysql_query("SELECT address FROM email WHERE address ='{$new_emailaddress}'") <>FALSE) {
echo "This email address already exists . Enter a new one.";}
the problem is, the query always returns true. But I want to compare it to the email address the user enters.
Can anyone help me?