next up previous
Next: Processing an Order Up: Form Processing Previous: Form Processing

Validating User Input (Bonus -- 15 points)

Before any processing occurs, your code should verify that the contact information portion of the form was completely filled out. If the name, address, city, zip code, username or password fields have no data or if none of the ``intended use'' boxes were clicked by the user, an error page should be generated. The error page should indicate which field was not completed by the user (if more than one is blank, you simply need to issue a message about the first blank field encountered in your tests). In addition, if the original password entered doesn't match the password re-entered by the user, a different error page should be displayed indicating that the two passwords were not the same.

After verifying this data, the product file must be read as in the form generation stage.

The script should then determine whether anything was ordered by the user. If none of the boxes were checked or quantities less than 1 were provided for those boxes that were checked, an error page should be generated indicating that no items were ordered.

Notes on error pages:


next up previous
Next: Processing an Order Up: Form Processing Previous: Form Processing
Louis Ziantz
4/23/1998