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

Full code for the backend available at

The Android Studio project full code also available at GITHUB.

The previous tutorials also available at

+ Login facilities

+ Insert a new record

+ Listing & Search

+ Complete Android tutorials is available at



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.



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. – The complete code class – this is a helper class to handle data communication to the online server.


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 . You could email him at , or Whatsapp: