Good Evening!
First of all this is my First Question so sorry, i might be a little nervous.
I have a Problem in the following situation...
I have an ajax call like this:
$.ajax({
url: "test.php",
method: "POST",
data: {
"somedata": "somedata"
},
success: function(){
//Do something when it is an success
},
error: function(){
//Do something when it is an error
}
});
Now i want to give in the test.php an error response so that the jQuery ajax call executes the error and not the success call even if there is no error.
Please don't answer like: 'Why would you like to do this?'
I just want to know if that's possible :)