DISC 4372 FINAL FALL 2000 Part 1

Name_______________________________________

SS#____________________________Database Name _______

e-mail address__________________________________________

1. (60 points) TO BE COMPLETED IN CLASS

A travel club wishes to send two gift books to new members. Every new member receives a 10 digit membership-id and the following web address: http://auckland.bauer.uh.edu/students/gl001/book2.asp. Write the book2.asp program to:

  1. First return a web page to the user that contains:

    1. A ten character field for their membership-id
    2. a submit button that returns the membership-id in a form to book2.asp

    Do not edit the user's data.

  2. When the user submits their membership-id, the book2.asp program looks up the membership-id in a table named members. This table contains all character data: the membership-id that is the primary key; member-name; member-address, member-city, member-state and member-zip. If the membership-id is not found, the program asks the user to try again by providing another page for the entry of the membership-id.The asp should allow for three attempts to get the membership-id entered. If the third attempt fails, book2.asp writes a page notifying the user to contact the sales office at 713-555-6666.

  3. If the membership-id is valid (i.e., exists), the program returns a list of all book titles in the book table. This book table contains only character data: Book-id and Book-title. The number of books in the table varies. Place a checkbox beside each book-title in the returned html. Return the membership-id as a hidden variable. Place a submit button at the bottom. The user should be directed to check two book titles and then press the submit button. VBscript on the client should test to see that exactly two book titles have been checked. If not, display the msgbox error: "You must choose exactly two book titles".

  4. When the user submits their request, the book2.asp program creates a new row in the table named orders. This table contains only character data. Fields in this table are: membership-id (the primary-key), member-address, member-city, member-state, member-zip, book1 (book-id of the first title chosen) and book2 (book-id of the second title chosen). Once written to the order table, the book2.asp should return to the user a message stating that their book order is on the way. Include the two book-titles in the final response. If the insert fails, write the text "Your book choices have already been received. You can't order more than once" to the user in HTML.