This question already has an answer here:
Hi I am requesting help with my PHP. I checked the code through and I couldn't spot any errors in it.
I'm not that great with PHP, and I hope any of you could help.
It should return either false or true but, I get this error
Fatal error: Call to undefined method mysqli::num_rows()
Here is my code:
$mysqli
is my mysqli database connector.
$email = $_SESSION["email"];
function isbanned($email){
global $mysqli;
if($mysqli->num_rows("SELECT * FROM `user_bans` WHERE `banned_id` = '".$email."' LIMIT 1") > 0){
return true;
}
return false;
}
isbanned($email);
That's all my code for the banned script.
Thanks in advance.
</div>