I'm trying to run some AJAX code on my web hosting. The problem is that it works on my localhost but it doesn't work on my web hosting. Do anybody know how to solve this problem?
This is the code:
function validarCorreo(mail){
var bool = false;
var mail = {"mail" : mail};
$.ajax({
data: mail,
url: '/carepets/validaciones/validarCorreo.php',
type: 'post',
async: false,
success: function(response){
if(response == true){
$("#autenticacionCorreo").html("El correo esta disponible.").css("color","green");
bool = true;
}else{
$("#autenticacionCorreo").html("El correo esta ya registrado o es incorrecto.").css("color","red");
}
}
});
return bool;
}