Basically on your web server, you would use a scripting language like PHP to write several scripts that would take either HTTP GET or HTTP POST requests (in PHP key/value pairs are either in the $_GET[] or $_POST[] tables) that represent the API endpoints you need to setup. You would potentially need a login, register, submit data, search data scripts depending on what you do. Your PHP script’s responsibility is to take the input from our network.request() call and manipulate your database with them. Of course you’re responsible for scrubbing the data to make sure it’s safe. The PHP script talks to your MySQL server. Then the script would output data back to your app and in the listener function for network.request() you get an event table and one of the entries is “event.response” which holds the output from the PHP script.
Most people have PHP output JSON so you can easily use our json.decode() API Call to turn that web server output into a Lua table.
Then once you have your script, you use network.request() to load the script passing key/value pairs to it either a GET or POST request.
Rob