Course: ITSE6079 CGI Programming Techniques
Instructor:
Ashley Rosilier cgi@iteachu.com

Dates: Aug. 4 - Sept. 12, 2003

Class Quick Links
Syllabus Roster Grades Schedule Forums Chat Lessons Projects
[an error occurred while processing this directive]
 
On-line Tutorials College Credit Continuing Ed. Certifications

Home > Continuing Education > CGI Programming > Projects > Project 4

 

Project 4 - Multi-part Form Email

Due Date - Fri., Aug. 29

Overview

Simple one-page forms can be handled by readily available form-email scripts, such as Formmail.cgi. However, if you want to break your form into multiple pages or do any processing on the form data, you may have to write a small script yourself. Multi-part forms are very useful, and this project is actually based on a job I was hired to do.

In addition, sending email from a script is one of the most comon tasks for CGI scripts, so it's good to see how it's done.

Preparation

Objectives

  • Write an CGI script of moderate complexity
  • Understand how state information is passed between multi-part forms

Script Details

Write a perl script to collect information about users to your website. The HTML form will be broken into two parts, and the information gathered on the second part will depend on the user's occupational status.

  1. Display an HTML form requesting the following information from your site visitor: name, email address, location, and occupational status (employed, unemployed, student). All fields are required.
  2. The information should be submitted to the script and a second HTML form should be displayed, collecting the following data based on the occupational status:
    • For employed persons: their occupation and employer
    • For unemployed persons: their desired field of work
    • For students: their school and field of study
  3. Upon submission, the results from both forms should be compiled and displayed for the user. (Note: the original intention of the project was to have the script email the information to someone. However, the ACC servers do not support the sendmail feature so we are instead printing the information to the browser. If you have access to another server, you may want to try using the sendmail function also).

Demo script

Notes

  • There should be a single CGI script to accomplish this project. If it helps you to understand the project, you can start with a separate CGI scripts for each page of the form, but you will need to combine them into a single script before submiting your work.
  • All HTML forms should be generated by the CGI script. Do not use any plain HTML pages for this project.
  • You can either decode the form data yourself (refer to Chapter 4 in the text) or use a CGI library, such as CGI.pm.

Project Submission

You should have a link to the functional script from your main project website. Email the text of the script and the working URL to cgi@iteachu.com by the deadline date in the schedule.

Jump to Forums [Project 4]

 

Last update: 12-Aug-2003 23:36

 
About iTeachU
Programs Offerred
Library
Book Store
Other Resources

Course Access

 

 

 

Home > Continuing Education > CGI Programming > Projects > Project 4

On-line Tutorials College Credit Continuing Ed. Certifications

 

info@iteachu.com

© Copyright 2001-2002 iTeachU All Rights Reserved