Assignment #3 - CGI Assignment
Write a CGI script with an HTML form front-end that does something fun and interesting.
Here are some examples of CGI scripts you might write:
- Guestbook - A simple form where people can enter their name,
their email address, and a small comment. Hitting the 'Submit' button
should display their comment, and the comments of everybody else that has
posted before them.
- Voting - A front end that presents a list of choices (i.e.
favorite flavor of ice cream). The submit button will record the choice and
display percentages or a bar chart which shows the tally of the votes
- Email Gateway - Presents the user with text fields for subject
lines, destination and return addresses, and a large text field for a
message. Hitting 'submit' will send the email.
- Message Board - Make a flat or threaded message board suitable
for posting comments. Posters should be able to entere their name, email
address, and a message.
- Man Page Gateway - Write a CGI script which translates from man
page (nroff) to HTML format (hint: use regular expressions), and makes the
"See Also" references links to other man pages.
- Bot - Write a 'Bot which searches other URLs for information,
retrieves the info, and presents it in HTML. Should be fun. (Hint: If you
do this one, lynx and / or wget are your friends.)
Here is what I expect to see in your CGI assignment:
- HTML Form front-end - You need to have an "entry form" which uses at
least one HTML FORM tag and accompanying widgets. This file will reside in
your public_html directory and be called form.html.
- CGI Script - You need at least one script in your cgi-bin
directory which will be called from your HTML form front-end when the user
clicks the Submit button. I don't care what you call it, just so
long as it's got a .cgi extension.
- Handle Query Strings - You will need to parse the query strings that
get passed to your script either via the GET or POST method. This means
you will need to read from environment variables and probably use some
regular expressions.
- Generate HTML - Your script will need to generate some HTML and write
it to stdout so that it is displayed in the browser.
File Names and Locations
You should call your entry form form.html and put it in your
public_html directory. Please don't call it something else.
Your CGI script(s) should have a .cgi extension and need to go in
your cgi-bin directory (underneath public_html).
Due Date
This assignment is due on April 29th, 1999, same night as the Final Exam.
Changelog
3/17/99 - Initial revision
4/8/99 - Added "Gestbook" suggestion, changed the name of the file from
cgi.html to form.html. Please make a note of it.