September 2002
Intermediate to advanced
544 pages
13h 6m
English
Now that you’ve seen how to create cookies and how to retrieve them after they’ve been stored, I can show you how to create and maintain sessions using cookies. You’re going to create what in all likelihood is the world’s smallest shopping site, because the catalog only contains two items. The way the site works is that there is a separate cookie for each unique item in the catalog. The cookie stores the quantity of the item that the user is going to order. When the user checks out of the store, the check-out program looks at the cookies that are sent back by the browser and builds a list of items that the user has ordered.
This isn’t how a real shopping site would work; if there were thousands of items in the ... |
Read now
Unlock full access