I am having this code:
$sql=mysqli_query($con,"SELECT username, password, email FROM users WHERE username=$username");
if(mysqli_num_rows($sql)>=1)
{
echo "<div class='form'>
<h3>Username already in use.</h3></div>";
}
When using this code, it returns the following warning:
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in...
Why it showing this warning and how do I fix it?