The code below should verify how many rows are in the query, or print an error message...
Instead, the script just stops and doesn't show any error.
Anyway, I know there's some kind of mysql error, but I have no ideia of what it is. Why isn't die() returning the error? Something related to the host, perhaps? php.ini?
Code: Select all
function VerificarUsuario($Login_,$Senha_){
$Query = "SELECT * FROM usuario WHERE usu_login='".$Login_."' AND usu_senha='".$Senha_."' AND usu_status=1";
$Consulta = mysql_query($Query);
echo "Consulta";
$NLinhas = mysql_num_rows($Consulta) or die(mysql_error());
echo "NLinhas";
if($NLinhas>0){
return true;
}else{
return false;
}
}Thanks in advance.