Hello, I have the following code:
if ($Validate=="True")
{
$SQL = "select Username from users where Username=$Username";
$Result = mysql_db_query($DB, $SQL, $Connection);
$Rows = mysql_num_rows($Result);
if ($Rows < 1)
{
print "<br>This username already exists.";
}
else
{
print "<br>This username is unique.<br>";
}
}
But for some dark reason the code crashes at the line of $Rows = mysql_num_rows($Result);
saying 0 is not a MySQL index ....
Does anyone knows what's wrong with this code?
Patrick