Assignment 1 CO957 2006 - Table Wizard

Objectives:
Experiment with CGI programming.


    Submit a form.
  1. Create a static html document with a form. The form action will be to submit the data to your perl program.
  2. The perl prgram will output an html table built based on the input parameters sent to the program from your original html form.
  3. The html form will allow the user to define the number of rows and columns (textboxes), table border (selection pull-down list), the table background colour (radio buttons) and the type of dummy data to fill in the table with (checkboxes).
  4. Provide four radio button for background colour: lightblue, yellow, wheat and cyan.
  5. Provide three checkboxes for filler data, numbers, letters and strings. If the user selects numbers they will get a randomly selected number from zero to 10,000. If the user selects letters the table will be filled with a randomly selected letter from the range A-Z. If the user selects strings as the filler you will randomly select words from the unix dictionary as the table filler. If the user selects more than one checkbox you will populate the table with all of the items selected, randomly picking one format from the list of three.
  6. Examples: 3 rows, 4 columns, lightblue, 2px border, numeric filler
    56883027
    41791270
    93613135
    2341979


    4 rows, 5 columns, yellow background, 2px border, letter filler
    DRCYY
    QNUMJ
    CQCQK
    OSBYX


    3 rows, 6 columns, wheat background, 2px border, string filler
    barefooted booze cashmere Barhop stoppers bituminous
    invalid brays desires despairs procrastinate McCarty
    Burgundy arbor shameful applicative hug straightway


    5 rows, 4 columns, cyan background, 5px border, numbers and letters for filler
    T0781191
    WM347J
    Z142311Q
    UIH802
    754VS271


    5 rows, 6 columns, wheat background, 10px border, numbers, letters and strings for filler
    displeasing cellophane 14perpetuating Ultrix U
    123disgust blitz E253160
    mincing bayou treetop valuables 120909
    651Tschedules 608ID
    W473tablecloths virtuously 306O


  7. Use the CGI module installed on csunix (Read perldoc CGI). You may use the object oreinted approach or the function based approach. Both allow you to very easily generate html components using method or function calls. You will need to read the documentation to get examples of how to produce the html you want.

All the programs you write in this course will enable 'use warnings;' and the 'use strict' pragma must also be in effect.

Approximately 25% of your mark is for documentation. Please include descriptive text in your program which explains to another programmer what you were thinking when you wrote the code.

Please read about documentation.

Every program you hand in must include a Statement of Authorship.

"I John Doe, 123456 certify that this material is my original work. 
No other person's work has been used without suitable acknowledgment and I have not
made my work available to anyone else."

Hand-in:
Develop your solution on csunix in ~/public_html/cgi-bin/957a1.pl and ~/public_html/957a1.html
When you are finished you must copy your files to this directory ~/public_html/Qweb_assign/collinw/a1/
Name your program 957a1.pl and your form 957a1.html

Deadline:
Wednesday Oct. 4, during lab time.