DevShed - Setting Up Database Driven Websites
★ wanayoo — archive 1999 http://www.devshed.com/Server_Side/Administration/Database/page8.htmlNouvelle recherche | Portail wanayoo

Developer Shed
Saturday, 09.04.99  

HOME > SERVER SIDE > ADMINISTRATION > ARTICLE    SOURCE

Power Search
Free Newsletter:


Client Side
DHTML
Graphics
JavaScript

Server Side
Administration
ASP
MySQL
PHP
Python
Roxen
Zend
Zope
Web Hosting

Tools
HTML Editors
Graphic Editors
FTP Programs

Dev Talk
Forums
Mailing List
Brain Dump
Feedback

ClipScripts
Add script
Edit script


Advertise
on DevShed
JUMP TO:
> Introduction
> Requirements
> Installing MySQL
> Installing Apache
> Installing PHP
> Creating the Database
> Making a PHP Script
> Testing the Script
Setting Up Database Driven Websites
By Ying Zhang
May 20, 1999

Testing the Script

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?



Click here to discuss this article
with other readers
. 50 comments.


Click here to receive updates on the latest articles.



Printer friendly versionPrinter friendly version

Tech News:
• "Thursday" Virus Considered A Threat
• Presidential Candidates Fail Web Privacy Test
• New Game Boy To Include Net Access, 32-Bit Chip
• IBM To Make Networking Chips
•  More news..
•  New! PHP & MySQL Books

Hot Forum Topics
Need Help with JOIN
mySQL Date manipulation using PHP3
Site Server and "++"
I can´t run cgi´s via web...



Copyright © 1997-99 ngenuity. All rights reserved. Privacy Policy.