ASP code page 1<br>===============<br><%<br><br>Dim prodid, quantity, arrCart, edagangItem<br>prodid = Request.Form("fproductid"
<br>quantity = Request.Form("fquantity"
<br>arrCart=Session("bakul"
<br>edagangItem = Session("cartItem"
<br><br>If edagangItem = "" Then<br> Response.Redirect "<A HREF=" TARGET="_new"> &<br>Server.URLEncode ("Sila membenarkan cookie pada pelayar anda untuk berurusan<br>e-dagang."
<br>End If<br><br>If prodid <> "" Then<br> If edagangItem < maxCartItems Then<br> edagangItem = edagangItem + 1<br> End If<br> Session("cartItem"
= edagangItem<br> Dim rsItem<br> Set rsItem = Server.CreateObject("ADODB.Recordset"
<br> rsItem.Open "products", dbc, adOpenForwardOnly,adLockReadOnly,adCmdTable<br> rsItem.Filter = "catalogID = " & prodid<br> If Not rsItem.EOF Then<br> arrCart(cProductid,edagangItem) = rsItem("catID"
<br> arrCart(cProductCode,edagangItem) = rsItem("kod"
<br> arrCart(cProductname,edagangItem) = rsItem("name"
<br> arrCart(cQuantity,edagangItem) = CInt(quantity)<br> arrCart(cUnitPrice,edagangItem) = rsItem("price"
<br> Session("bakul"
= arrCart<br> rsItem.Close<br> dbc.Close<br> End If<br>Else<br>Dim strAction<br>strAction = UCase(Left(Request.Form("action"
,5))<br>Select Case strAction<br> case "SAMBU"<br> response.redirect "<A HREF=" TARGET="_new"> "HAPUS"<br> response.redirect "<A HREF=" TARGET="_new"> "SIAP "<br> Response.Redirect "<A HREF=" TARGET="_new"> Select<br>End If<br>%><br><br>ASP code Page 2<br>===============<br><br><%<br>Dim isubtotal, i, edagangItem, arrCart<br>edagangtem=Session("cartItem"
<br>arrCart=Session("bakul"
<br>isubtotal = 0<br>For i = 1 to edagangItem<br>%><br> <tr bgcolor="#D3D3D3"><br> input name="selected" <%= cstr(i)%> type="checkbox" value="yes"<br>checked><%= arrCart(cProductCode,i) %></td><br> <td width="40%"><%= arrCart(cProductname,i) %></b></font></td><br> <td width="15%"><font face="Verdana" size="2"><input type="text"<br>name="quantity" <%= cstr(i) %> value="<%= arrCart(cQuantity,i) %>"<br>size="10"></font></td><br> <td width="15%"><font face="Verdana" size="2"><%=<br>FormatCurrency(arrCart(cUnitPrice,i),2) %></font></td><br> <td width="15%" align="right"><font face="Verdana" size="2"><%=<br>FormatCurrency(arrCart(cUnitPrice,i) * arrCart(cQuantity,i),2)<br>%></font></td><br> </tr><br><%<br> isubtotal = isubtotal + (arrCart(cUnitPrice,i) * arrCart(cQuantity,i))<br> Next<br>%><br><br>My Question<br>==========<br><br>OK, here is my coding for two ASP pages. From ASP page 1, if user type SIAP,<br>the page will redirect to an ASP login page that will validate the username<br>and password. If everything is OK, it will then redirected to ASP page 2.<br><br>The problem that I am facing is session for array cartitem and bakul are not<br>shown in page 2. But it works fine in page 1.<br><br>Please Help.<br><br>Thanks<br><br><br><br><br><br><br><br>