I've been thinking in how to do this. I've read trough the OKHTTP documentation, I have an idea on how to handle this but I'm not entirely sure.
I'll have the user submit three fields ( Username, Password, Database ). I'll have a PHP file uploaded to my host which accepts post data. ( It's pure PHP, so no html. It just accepts data posted to the page. )
Once the values have been submitted, i'll perform a check. Credentials found? Return/echo JSON array ( Success/ Failure ). I could check if the array key " success " equals either 1 || 0. If 1, show a toast that user has been logged in successfully.
Now, as for the question. Is my logic correct? If not, how would you do it? Do you have any tips for me? Any examples?