This question already has an answer here:
$query = "SELECT * FROM tbl_usuarios WHERE email = 'teste@teste.com' and senha = '123456'";
$res=mysql_query($query);
$number=mysql_num_rows($res);
WARNING : mysql_num_rows expects parameter 1 to be resource boolean given i have no ideia why its giving me error
</div>
it may be the connection error
try
<?php
$con = mysqli_connect('localhost', 'username', 'password','database');
$query= "SELECT * FROM tbl_usuarios WHERE email = 'teste@teste.com' and senha = '123456'";
$res = mysqli_query($con, $query) or die(mysqli_error($con));
while($return_row = mysqli_fetch_array($res, MYSQLI_ASSOC)){
$name = $return_row['name'];
}
?>