Hello. The application connects to the database on the server, where, for example, it tries to add “Vasya” to the username column. All username values ​​are unique. On php somehow I made it so that only a unique value fit into this column, but how, if, for example, “Vasya” already has to return and process the message (android) about this?

    1 answer 1

    1. Make the PHP script output, through echo for example, the result of its work. Something like a string / number. For example, success/error or 0/1 for a successful insert / error.
    2. When accessing this PHP script, you will receive these values ​​as a server response and at that moment you can process them as you please on the side of the android application.
    • Exactly, thanks! - lounah pm
    • @Schepalin, please) - Yuriy SPb