Are the following:
There is an Android application which upon registration is on the server, PHP processes the data, and should return a negative response, but if all the rules that entered into database.
How to make let's say if a user of the application enters a name (say): "hi", then PHP gave a server error? That is, I need to study to in Android could get, they say the server doesn't like your name, select more.
I was thinking something like this:
if($_POST['username'] == 'hi') http_response_code(500);
if($_POST['username'] == 'hi') header($_SERVER['SERVER_PROTOCOL'] . '500 Internal Server Error', true, 500);
But not the same =( And even better to do in this situation, that on Android I could get an error which gives a server?