BEFORE YOU GO FURTHER, let me suggest to you STRONGLY that you put up an existing Perl/CGI script - any existing Perl/CGI script into your own I5 account so that you get over the mechanics of posting it, giving permissions to it and testing it. Use one of mine or one from the book. Do it NOW!!
The "Red, White and Blue" assignment will allow the user to choose one of three Director movies ("Red," "White" or "Blue") to be served to them. The movies should be short and built around a central theme. The three movies could be about 3 examples of patriotism, 3 emotions, the affect of 3 colors, 3 cartoon characters, the stories of 3 balloons, etc., etc. Anything you like as long it is around a central theme, and has at least some tangential link to the three colors. The movies don't have to be interactive, so they should be pretty simple to make. (This may all be inspired by Kieslowski's film trilogy, but, then again, it may not!). Your movies should be in 320 x 240 format to keep them small. Also, keep the running time down to something reasonable.
As you read the following description, refer to the flowchart of the assignment.
(Note that this assignment does NOT use any Cookies!)
First, it should be noted that this is the same Perl script that is run for every submission. There is NOT a special script for the first time, etc.
The Script should create a web page for the user based upon their movie choice, and update a data file that keeps track of the order of the choices (not unlike my Shaggy vs. Gates script).
A. The web page the script creates and returns should include:
B. The CGI script should read and update a data file (held within cgi-bin) that includes 9 counts:
Choice # 1: num_red num_white num_blue
Choice # 2: num_red num_white num_blue
Choice # 3: num_red num_white num_blue
Note that the first time the script is run, there aren't any fields that hold previously chosen movies. You can use this fact to determine that you have to output a new list of previously chosen movies. (You can check if a key exists by asking something like if ($choice_1) If. you get a 'true' value, the field was submitted; otherwise, it wasn't.)
As noted above, the web page includes the selected movie, radio buttons that allow the user to choose the next movie, and various hidden fields. Also as noted above, it tells the user how many other people picked the selected movie in the same order.
For the third user's choice, the CGI program does NOT send back the red/white/blue radio buttons at all! Instead, all that is visible is a "Submit" button that actually is linked to the final web page.
Version 1.0 - Now includes a flowchart of the assignment
Thus, the URL for looking at your page (presuming that you have User ID "abc1234") would be:
In the Subject field of your message, please put the assignment number you are turning in.