Homework 5 -- Writing a CGI script

Preparation

Create a drop-off directory within your Computer Science home directory by typing the following commands:

The task

This is Homework 4 in CGI. To get an idea of the problem, load up and submit the sample input form. This form sends a CGI request to a CGI script, written in C++. This server "remembers" one animal that it writes into a small 32-byte file.

The assignment

This is a 30 point assignment that can be completed at different levels. Your completed assignment should be stored in the directory ~/csci/343/home05 that you created above.

The C/D level

Write a CGI script which processes this form. However, this script need not "remember" different animals between uses. It should use the color and animal provided by the form as the second animal of the output verse, but can always use the same animal as the first animal.

You can do this assignment in groups of up to two, if both you and your partner keep a "diary" as explained below.

If you choose this level, store your program in home05x.c.

The B/C point level

At this level, your CGI script must remember the previous animal. This is the example CGI script you used above.

You can do this assignment in groups of up to three, if all members of the group keep a diary of their work.

If you choose this level, store your program in home05y.c or some other appropriately named file if you use a programming language other than C.

The A/B level

At this level, your CGI script must use cookies to remember a different previous animal for each user.

If you choose this level, which can also be done in groups of three keeping diaries, store your program in home05z.c or some other similarly named file.

Diaries, groups, and help

The rules regarding working in groups and asking for help are the same as those of Homework 4.

Due dates and turning it in

This assignment is due at noon on Friday, November 12. No late assignments will be accepted.


Back to the CSCI 363 homework page
Back to the CSCI 363 home page