2
$sql = "SELECT `id`, `nome`, `nivel` FROM `usuarios` WHERE (`usuario` = '".$usuario ."') AND (`senha` = '". sha1($senha) ."') AND (`ativo` = 1) LIMIT 1"; $result = mysqli_query($conn, $sql); if (mysqli_num_rows($result) != 1) { echo "Login inválido!"; exit; } else { // }
Error:
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in
It appeared here bro: SELECT
id
,nome
,nivel
FROMusuarios
WHERE (usuario
= 'test') AND (senha
= '40bd001563085fc35165329ea1ff5c5ecbdbbeef') AND (ativo
= 1) LIMIT 1 Warning: mysqli_num_rows() expects Parameter 1 to be mysqli_result, Boolean Given in /Storage/ssd5/850/7211850/public_html/validation.php on line 30 Invalid login!– Wili Macena