5.8. Creating sales reports

  1. Copy the code from the previous example's CGI script to create a script that shows a drop-down list of salespeople, and which has two date fields.

  2. Write a second script to output a sales report for the chosen salesperson for the period between the two dates.

5.8.1. Advanced exercises

  1. Create an extra option for "all" sales people, which shows all the sales people in descending order of sales made. You may need to use an SQL group by clause to achieve this.

  2. Combine the two CGI scripts together, checking the parameters passed (or lack thereof) to see whether to print out the form or the results