0
I make the request, I get the right amount, but at the time of the check it’s not right
$.ajax({
url:'includes/checkCPF.inc.php',
method:'POST',
type:'POST',
data:{cpf:cpf},
success:function(data){
alert(data);
if(data == "V")
{
alert("b");
$(".cpf").addClass("ShadowRed");
$(".cpf").focus();
return
}
});
php:
<?php
include_once '../acesso.php';
$cpf = $_POST["cpf"];
$sql = "SELECT * FROM login_usuario WHERE CpfUsuario = '$cpf'";
$pedido = $conn->query($sql);
if(mysqli_num_rows($pedido) != 0)
{
echo "V";
}
else
{
echo "F";
}
The Alert returns what?
– rray
V or F based on php’s if
– Eduardo Ferreira