Modify the shopping cart (Section 26.3) to include a feature that allows a user to update their cart. Modify view- cart.asp (Fig. 26.7) to allow users to edit an item’s quantity. Use the value zero to indicate the removal of an item (i.e., set the quantity to zero). Write a document named updatecart.asp that updates the quantities stored in the cookie. After the quantities have been updated, the user is redirected to viewcart.asp. Also modify viewcart.asp to provide an Update Cart button that, when clicked, redirects the user to updatecart.asp.
What will be an ideal response?
The first table contains viewcart.asp and the second table contains updatecart.asp.
```
1 <% @LANGUAGE = VBScript %>
2 <% Option Explicit %>
3
4 <% ' viewcart.asp %>
5
6
7
8
9
10
11
12
13
14
15
16
17
18 <% Dim i, j, splitArray, quantity, total, subtotal, count
19
20 count = Fix( Request.Cookies( "Books" ).count / 2 )
21 If Request.Cookies( "Books" ) = "" Or _
22 CInt( Request.Cookies( "Books" )( "empty" ) ) = count Then %>
23
24
25
26 Your cart is empty.
27
28
29
30
31 <% Else %>
32
33 CELLPADDING = "0" CELLSPACING = "3">
34
35
36
37 This is your curren
Computer Science & Information Technology
You might also like to view...
Answer the following statements true (T) or false (F)
1. The vast majority of network based symmetric cryptographic applications make use of stream ciphers. 2. The Feistel cipher structure, based on Shannon's proposal of 1945, dates back over a quarter of a century and is the structure used by many significant symmetric block ciphers currently in use. ? 3. DES uses a 56-bit block and a 64-bit key. ? 4. If the bit-stream generator is a key-controlled algorithm the two users only need to share the generating key and then each can produce the keystream. ? 5. A problem with the ideal block cipher using a small block size is that it is vulnerable to a statistical analysis of the plaintext.
To use the Bristle brush, you first create a new brush in the Brushes panel and choose Bristle Brush as the definition.
Answer the following statement true (T) or false (F)
The ____ slider in the Refine Edge dialog box expands or contracts a selection marquee.
A. Contrast B. Feather C. Shift Edge D. Pixel Margins
A(n) ____ is an acceptable value for a data type.
a. primitive value b. literal c. built-in value d. class value