This tutorial is to insert a new record from Android apps, to be stored at onine database.


Full code for the backend available at bit.ly/gitjson

The Android Studio project full code also available at GITHUB.

The previous tutorials also available at

+ Login facilities http://bit.ly/loginkerul

+ Insert a new record http://bit.ly/insertkerul

+ Listing & Search http://bit.ly/jsonsearch

+ Complete Android tutorials is available at http://fstm.kuis.edu.my/blog/android/


 

BACKEND

createuser.php – The backend code to accept the record/data. This PHP script will fetch data from Android form, and send to the database thru SQL.

 

FRONT-END (MOBILE APP)

In Android Studio, add a new activity screen to display the insert new record form. As in the picture below, this screen Activity will provide input form for the user to fill in username, password, userlevel, fullname & email.

Android app create new user and save to online database form input screen

Android app create new user and save to online database form input screen

The XML for the UI layout.

 

CreateUser.java – The complete code

 

 

HttpHandler.java class – this is a helper class to handle data communication to the online server.

 


Trainer:
KHIRULNIZAM ABD RAHMAN, Department of Computer Science, FSTM KUIS.

He is a certified HRDF Trainer – specializing in client-side and back-end web based system development since 2000. His main programming language ingterests are Java, Android, PHP, Laravel JSON, MySQL, and currently Flutter.

Among short-courses he conducted are;

  1. Android Studio
  2. Web Development using PHP&MySQL
  3. Web-based System development using Laravel framework 

His personal blog is at KERUL.net . You could email him at  khirulnizam@gmail.com , or Whatsapp: http://wasap.my/60129034614