In this tutorial I want to show you how to connect App Inventor to a MySQL database using PHP. I tried to keep everything as simple as possible while at the same time teaching enough so that you can do anything.
You’ll be able to submit to, update and then receive a CSV file from the database using the PHP files below. You’ll also be able to limit access to data simply by creating a different PHP file for each person that would need to access the database. Everything you need can be found below.
If you like videos like this, it helps my search results if you tell Google Plus with a click here
MySQL Database Setup
App Inventor MySQL Design View
App Inventor MySQL Blocks
Click the image below a few times to view it full screen
$result= mysqli_query($dbc, "SHOW COLUMNS FROM customer");
21
$numberOfRows= mysqli_num_rows($result);
22
if($numberOfRows> 0) {
23
24
/* By changing Fred below to another specific persons name you can limit access to just the part of the database for that individual. You could eliminate WHERE recorder_id='Fred' all together if you want to give full access to everyone. */
25
26
$values= mysqli_query($dbc, "SELECT * FROM customer WHERE recorder_id='Fred'");