V22.0005 - Spring 2004
Assignment # 6

Due: Tuesday, April 13th

Projects should be posted on your I5 Web account under the name "assign6.html"

Be sure to email pnp2@cs.nyu.edu to turn in your assignment.

Do you remember Assignment 4??

Well, this assignment extends it!

(BTW- you should also still keep your original Assignment 4 posted without changes in case we need to look at it again!)

In this version, you will still have a set number of items in your shop, but this time you will keep an inventory, and send an email message confirming the purchase (as long as it is within the "nyu.edu" domain).

1) First, create an "Inventory Update" page that will tell you, the shopkeeper, how many of each item you currently have on hand, and how many you have sold for each item. There will be a text box beside each item that will allow you to update the quantity on hand from 0 items on up. When you hit 'submit', the the number of items on hand will be updated on a data file on your I5 account.

Note: It will make life easier if you already have a data file on the server before you run your scripts the first time- it could even be all zeroes if you like!

2) Extend your ordering system so that the Personal Info page requires an email address - which is forced to be one at nyu.edu (because you will only ask for the part of the email address before the @).

3) On the Product Choice page, any item which currently has a zero count in quantity on hand will have its picture replaced by an Out-of-Stock graphic.

Note: This probably means that the page is NOT an html file, but is html which is generated by the cgi script.

4) Finally, the Confirmation page should put out an error message in the case the customer has ordered more items than are currently available and reject the whole order.

Note: Again, this is probably now generated by a cgi script

5) Once the customer has placed an order, an email message which includes an order summary and total should be sent to the customer's nyu.edu address.