Mysqli_Num_Rows Error, "expects parameter"
I'm creating a few lines to check if a user exist within the database. To
do this, I was going to just find the username in the DB and if there IS a
user with that name in the database use num_rows to make it show that
their is a user with that name.
The error is:
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result,
boolean given in /home/bluef/public_html/SMNS/register.php on line 36
Code:
$usernamef = mysqli_query($link, "SELECT * FROM Users
WHERE Username =".$Username."");
$usernamefound = mysqli_num_rows($usernamef);
if($usernamefound != 0){
echo "Username in use, try another username?";
}
No comments:
Post a Comment