Homework 1: Due 04/22/03, 9:30pm. Put in my homework box in the computer lab.
In this assignment, you will make two things, a web page with an HTML form, and a CGI program that will accept the form data and produce a web page. The form will allow the user to select or type in a month and year. After the user clicks the submit button, the CGI program should produce a nicely formatted calendar showing the month and year specified by the user. The calendar output should look like this:
March 2003
Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Your forms pages should have at least these features:
At least three form elements, one for the month, one for the year, and a submit button.
You can use any type of form elements you wish. Text fields, radio buttons, menus, etc. are ok.
The user should be allowed to select any month of the year.
The user should be allowed to select at the minimum any year between 1990-2005, inclusive. You are allowed to extend the choice to any year that cal will accept.
You can use GET or POST methods.
Your CGI program should have at least these features:
Use the CGI.pm module.
Use the Unix cal program to generate the data for the calendar. Read the cal manpage.
All generated HTML must use CGI.pm subroutines or object methods. No hand-coded HTML!
The calendar page will have a link back to the forms page so that you can enter another month and year.
Turning in the following for full credit:
A print out of your forms page HTML code.
A print out of your CGI program source code.
A print out of forms page (screen capture).
A print out two examples of your calendar (any month and year).