Computer Science 396S
Assignment 5
Due: October 15, 2003

For your fifth assignment, use the database you created for assignment 4.  Write a program that collects data from an html file and inserts it into the database.  Use the SQL Insert command. After the new data has been inserted into the database, display the entire contents of the database on the screen.

The Insert query will look similar to the following:
 "INSERT INTO AddressTable VALUES ('" + name + "', '" + email + "', '" + phone + "')"
Be careful to include single quotation marks around each value.  Since the entire query has to be a string, make sure that all parts are properly concatenated.

After inserting the new row into the table, display the entire database on the output page.  This is a check to make sure that the insert worked properly.  Be aware that if you try to add a row that has the same primary key as one already there, you will throw a SQLException.  So when you are testing your servlet, either remove the row before trying it again, or use a different primary key.

Hand in printouts of your files and a disk with the database, the Java files and the html file.