Onetime login System with Mysql Database in Kodular, Appybuilder & Thunkable || The Developer 2.0

Probably you want to read this first: What is MySQL and what is a relational database?

You can use this App Inventor example together with a php script on your web server to query your MySQL database on your web server.

Shival Wolf already provided a nice App Inventor Classic – MySQL interface. I now “translated” his example into App Inventor 2 with a few adjustments. Example queries by James.

Setup

  • Put the PHP code on your web server
  • Set the SQLKEY in your app and in the PHP code, they must match for this code to work
  • Setup your database connection information in the php script
  • Try out the code

Special Notes

  • Returns HTTP code 200 for a successful SELECT query
  • Returns HTTP code 201 to return anything that’s not a SELECT statement
  • Returns HTTP code 400 for any error with your SQL or setup
  • Make sure to remove any page redirects for mobile devices on your webpage, else the App Inventor app will not be able to access the php script and will get an 404 error: page not found instead.

App Inventor blocks

Please see here for the SQL syntax.

Run Query

Response Received

Display Table

To display the result table, I’m using 2 nested for each loops. In case you are interested in a nicer and more flexible solution, take a look at my dynamic table layout example.

Queries

Further blocks used

Watch database Connection Tutorial Video:

Watch login System Tutorial with MySQL

 

Click on Below button and complete task showed in pop up to Download the AIA File

Watch Point management System Tutorial with MySQL

 

Click on Below button and complete task showed in pop up to Download the AIA File