Simple Login Page Using MIT AI2

Posted by Azinudin Achzab on Fri, Nov 11, 2016
In Sharing-Post
Tags ai2, android, mobile-programming

Simple Login Page Using MIT AI2

(Link on below)

This time i’ll share a simple login page using MIT’s App Inventor 2

The idea is to make a login page with hosted database, in this case i separated the PHP file for sign up and login. In the PHP for login i’m just using select query which to match the username and password and in the PHP for sign up i’m using insert query to add the data from sign up form to the database through GET method.

Why using GET method instead of POST method? because as far as i know the only interaction of AI2 and the database is through the url, so the only way to insert data is using GET method. And if you’ve read my PHP for login and found out that the password is converted to csv table, it’s because converting to csv table is the way to deliver data from database to the application.

AI2 supported convertion from csv table to list, i thought converting the data from database to csv is a good and simple way to get the data. The convertion is featured on list menu, you just need to drag the block thats all.

And from the client side when you want to do a login or sign up you just need to open the PHP with a GET method addition on the url. The data you want to insert/select is taken from the textbox, so you just modifying the url on the client side program.

Thats all, a simple way to making a login page. You could implementing it on the other mobile IDEs but not recommend it on serious project because of security reason. There are so many way to make a login page on android application, this one is just a sample to explain you the step to make it. If you feel my way to do it is bad and this article cant explain more get up from your bed and kick some code. Cheers!


https://github.com/azinudinachzab/ai2-login-page