1
For example when entering the client (in PHP) validate if age is above 18, before inserting, validate with a condition, and if you enter return an error, which in ajax, could be type:
success: function (data) {
alert('Sucesso');
},
error: function (data) {
alert('Ocorreu um erro, verifique a idade informada!');
}
The ajax error is for errors in the link, not for "status". Sends a variable to PH via
data
of that callbacksuccess
and depending on that date alerts the correct content.– Sergio