I found this code for storing info in a session.
<%
option explicit
dim isbn, aCart(100), iLoop
isbn = Request.QueryString("isbn"
'Initialize aCart with contents of session variable
If IsArray(Session("cart") then
For iLoop = 0 to Session("cart"(0)
aCart(iLoop)= Session("cart"(iLoop)
Next
else
' no Session variable yet. Initialize item counter.
acart(0)=0 'counter for number of items in cart
end if
If Request.QueryString("action" = "add" then
'add new item to aCart
if len(isbn) > 0 then
acart(0)=acart(0)+1
aCart(acart(0)) = isbn
end if
elseif Request.QueryString("action" = "del" then
'replace the deleted item with the item above it
For iLoop = Request.QueryString("item" to acart(0)-1
acart(iLoop) = acart(iLoop+1)
Next
acart(0) = acart(0)-1
end if
' show content of shopping cart
Response.write "Items in shopping cart = "& aCart(0) &"<br>" For iLoop = 1 to aCart(0)
Response.write iLoop &". ISBN ="& aCart(iLoop) &_
" <a href='order_view.asp?item="& iLoop &"&action=del'> Remove</a><br>" Next
' update session variable
Session("Cart" = aCart
%>
My problem is that I want to store 2 variables, isbn and Titel. Do anyone know how to modify this code.
Best Regards
Joakim