Android: Error catching tips

Scenario: I want to insert name, username, password, age intoI want to insert name, username, password, age into

I want to insert name, username, password, age intoI want to insert name, username, password, age into mysql database from android app. I am using PHP to handling mysql database request. Say for example, I am entering data in the register page in the android app and I do not see any data appear in the mysql database. Since, android app does not show any error messages it is hard to diagnose error.

Solution:
In the Register.php file rather than getting data from the android app by $name=$_POST[“”] method try to set up some arbitrary value $name=”abc” and then browse the website/Register.php page and you will receive detailed error message.

Scenario:

MYSQL query in the PHP file returning error.

Solution:

Run the MYSQL statement in the MYSQL environment before embedding that statement in the PHP file.

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s