Assignment-3b

 

 

 

Foreword

Resources

Code Listings

Foil Sets

Assignments

Solutions

External Resources

SiteMap

Search

Home

Up ] Assignment-0 ] Assignment-1 ] Assigment-2 ] Assigment-3 ] Assignment-3a ] [ Assignment-3b ]

Design an HTML form

An HTML form consists of various form elements (or controls) such as text fields, checkboxes, radio buttons, and so forth. There are a couple of good tutorials on forms on NPAC's HTML Tutorials page. Be sure to check these out!

Your assignment is to design an input form that accesses an employee database. This form will be used in a subsequent homework assignment to write a CGI script.

  1. Incorporate the following data-entry fields:
    first name
    middle name
    last name
    social security number
    department
    street address
    city
    state
    zip code
  2. Restrict the zip code to five characters.
  3. Use a pop-up menu to select the state. (Hint: You'll find a ready-made HTML form element for this purpose at URL
       http://www.whowhere.com/Phone

    which you can "borrow".) Designate "Mississippi" as the default state.

  4. For the department field, make a set of radio buttons with at least three departments to choose from.
  5. Provide buttons for the following actions:
    Add (add a new employee record)
    Find (find an existing employee record)
    Clear (clear the input form)

    The first two are submit buttons, while the third is a reset button.

Here's a short form to get you started:

Last name: SSN: --
First name: Middle name:

Note that pressing the "Add Record" button simply echoes back the input data, which is exactly what your form should do.