COP3832, Fall 2000, Assignment 6
  Due Saturday, Dec 9 at 5 pm.
Upload the assignment by the due data and drop off a printout on Monday in
my office.
This is an optional assignment. It can be used to replace a previous assignment
grade.
This assignment is an extension of assignment 5. If you had errors on assignment
5, then fix them for this assignment. Then do the following additional tasks.
  - 
    Instead of writing to a text file, write the user's information to a database
    file. Refer to pages 240-241 for more information on opening a database.
    Also refer to the example on page 131-132 for accessing a database. Be sure
    to do record locking when performing a write to the database. Page 308 has
    an example that opens a database for reading. For reading, it is only necessary
    to do the tie and untie commands. You will need to choose one
    of the fields on your form as the index field into the database.
  
 - 
    For accessing a database, use the string
    
"+<&fd" not
    "+<&=$fd" as it is in the book. Also, the statement
    to include file control should be use Fcntl ":flock"; not use
    Fcntl; as it is used in some places in the book.
   - 
    When the user chooses the Add button, in addition to updating the database,
    arrange for a cookie to be sent to the browser that contains the value of
    the index field for this person's data in the database. The cookie should
    not store all the data for the user, only the index field. The cookie should
    expire in 15 seconds.
  
 - 
    When the form page is loaded, if there is no query string, then check if
    there is a cookie. If there is a cookie, then use the value of the cookie
    to index the database and fill in the form with the user's data. If there
    is a query string, then do not use the data from the cookie.
  
 - 
    When the user chooses the View button, display the entire contents of the
    database file in a readable format.
  
 - 
    In addition to the validation checks done on the server, add JavaScript to
    your form page that does the same validation in the browser. If there are
    invalid fields, display ONE alert box that describes all the fields
    that need to be updated. Do not submit the form if there are any invalid
    fields.
  
 - 
    Add a graphic to your form page that will have a rollover effect when the
    mouse moves over and out of the image. Use two images that have the same
    size.
  
 - 
    Whenever a value is changed in a form element, update the status bar with
    the new value that was chosen. This should work for text boxes, textareas,
    radio buttons, checkboxes, and selection lists. For checkboxes and multiple
    selection lists, include all the options that have been selected. Check out
    my page
    http://www.cs.fiu.edu/~downeyt/cgs3994/data/js/form.html
    for some examples.