I have a script where I use ajax that does not go into success
$.ajax({
data: parametros,
url: '../gestionUsuario/insertUsuario.php',
type: 'post',
success: function(response) {
alert("hola success");
if (response == 1) {
alert("insertado");
//$('#success_message').html('<h3>USUARIOS INSERTADO</h3>');
} else {
alert("no insertado");
//$('#success_message').html('<h3>ERROS INSERCCION</h3>');
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert("estatus " + xhr.status);
alert("estatus " + xhr.responseText);
alert("error " + thrownError)
}
The route is fine since the php inserts me into the database but the answer enters error
and the status
shows 0.