I make the request, I get the right value, but at the time of verification it does not work
$.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";
}