This tutorial is an introductory guide to get you started in the world of server-side-scripting and web databases. It covers installation and configuration of MySQL, Apache, and PHP. An example script is also included as a guide for making your own server-side-scripts.
All the work is done, let's see if it works! Make sure everyone has read permissions (chmod ugo+r) for these files, otherwise you'll get an Access Denied error message from Apache. You should now be able to use your web browser to access what you've just created.
Assuming you're using lynx:
$ lynx http://localhost/example
This should bring up a page that lists all the entries you added to the database earlier. For example:
Found these entries in the database:
* Homer Simpson, 555-1234
* Bart Simpson, 555-4321
* Lisa Simpson, 555-3214
* Marge Simpson, 555-2314
* Maggie Simpson, 555-3142
Add new entry
Select the Add new entry link, and you should go to a page that allows you to enter data:
Back to index
Enter something and select the Submit link. This submits the filled-out form back to the same PHP script. This time, there are values in the two fields name and phone, so these get added to the database.
You should see a message telling you something was added to the database. Select the Back to index link to confirm that your new entry is in fact there.
If everything worked, then congratulations! You've completed this howto and built your first web database application! It was pretty easy wasn't it?