Guestbook 5 -- Guestbook implementation using PHP
Study the following Guestbook Form and its associated CGI program to
handle the transactions:
Another implementation with an additional "db class" layer to provide a
database-independent impmementation
Assignment: Guestbook 5
Your assignment is to follow the previous lab which shows how to set
up for PHP. Then copy the PHP script guestbook5.php3 to your own cgi-php
directory.
Split the functions of the program so that it returns two rather
different pages (depending on how it is called):
- A guestbook form (no guestbook data is printed). At the bottom of
the form are two submit buttons:
- Submit the guestbook form for entry into the database.
- View the Guestbook records from the database
- The guestbook data from the database (no guestbook form is printed).
At the bottom of the page is a link or a button so that the guestbook form
version can be obtained.
You should create a link with the text
Guestbook 5 which points to your copy of
the new guestbook5.php3 form.
The first time it is accessed only the form should be returned.