I am new to android development. I want to do the login verification, using php mysql and json.
I am only taking care of the PHP, MySql and json part.
If the user enters the username and password in android app, then it needs to check the user table using PHP and Mysql and it needs to send only the status code like 1 or 0 using json.
If username and password matches then the status = 1 needs to send to the android app coding, else 0.
Status checking process need to be done in Android Coding part.
If status = 1 and I need to redirect to another window in android app .
I have seen lots of tuts and but nothing has helped me.
So, please kindly help me how to send the status from PHP to android app and how to get that status and validate in android.
I have done this code for my project. and it works fine. Give it a try.
Login2.php
Java Code for Android
login.java
take two edittext and button and on button click put this code.
delete saveperference method it you dont want to save username , emp_id to entire application.
CustumHttpClient.java