CMPS 335 Advanced Web Publishing
Perl CGI Programming
Assignment 4 (Guest Book) -- Spring 2002
Primary Objective of the Project
- A guest book web page (HTML form)
- A CGI script to read from and write to an external data file
Forms are used to obtain data from visitors. The data from
these forms may be used in various ways, including the following:
- The data can be e-mailed to the form owner or any recipient.
- The data can be written to an external file and kept for permanent
storage.
- the data can be retrieved at any time from the data file and
displayed on a Web page.
For this assignment, create a guestbook system that handles the
data in the above mentioned ways. Follow the instructions below:
Part A -- A guestbook web page (HTML form)
Create an HTML document called guestbook.html to
create a form for obtaining the visitor's information. The form should
contain at least the following elements:
- Input boxes
For the last name, first name, title, street address, state,
zip code, phone, and email address.
- A set of four radio buttons (age)
- A textarea box (for comments)
- A submit button
- A reset button
(Example of a guest book page)
Click Here for an
example of adding guest book entries
Part
B -- A CGI script for writing data to an external file
Create a CGI script called guestbook.cgi to transfer the
visitor's information to an external data file called guestbook.dat.
Your CGI script should also generate a Thank You page similar
to the one shown below:
Thank you for signing this guestbook
Ms Mary Anderson
Part C -- Displaying the guest book
Write a CGI script called displayGuestbook.cgi that can be
used to read the data from guestbook.dat and display the entire guestbook
on a Web page.
Click Here to display
the guest book
Return to CMPS 335 Home Page
Return to Web Site Home Page