Setting Up Database Driven Websites - Testing the Script (Page 8 of 8 )
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:
Name: ____________________
Phone: ____________________
Submit
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?
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |