Name:
Student ID:

PHP - CCIS 2630

Class 3 - February 2, 2004

Homework 3 (due by end of next class period)

Part 1 - 20 pts

Create a new page in your web site for a sales chart for 4 regions in your company (North, East, South, and West). You must use 4 arrays, one for each region. Populate the arrays accoring to the data below.

  North East West South
Quarter 1 141.2 344 123.3 48.3
Quarter 2 133.0 340.9 144.4 51.1
Quarter 3 177.5 288.3 97.2 68.9
Quarter 4 209.2 471.7 177.3 91.2

Create a table to display the chart above. Write the table by iterating through the arrays you created and populated. The first index in the array should be for Quarter 1 and the last for Quarter 4.

Add a column on the left which contains the Row information (e.g. Quarter 1 through Quarter 4).

Add a column on the right which contains the totals for all regions by quarter.

Add a row at the bottom that totals the sales for each region for the entire year.

MAKE THE TABLE 508 COMPLIANT

Incorporate this into the rest of the site, updating the navigation and using the same structure.

Part 2 - 10pts

On the form page from homework 1, use an associative array (hash) to create the state drop-down menu.

Upload the files to the server and email a link to your homework to phpclass@linux-classes.com