The following example is a simple session-based shopping cart that allows users to add or remove items from their cart.
The application, as shown in Figure 2-3, first asks for the user's name and email address. Users are then brought to the main shopping page where they can add or remove items from their cart by modifying the quantity text field for each item and clicking the “Add Items” button.
When the users have added at least one item, they are presented with a “Check Out” button. They can continue shopping or check out. This is shown in Figure 2-4.