paddywhistler
May 3rd, 2004, 11:27 AM
Hi Everyone,
I have a problem with setting up session variables! My ASP page displays the recordset database fields (name & price) with an input box for the user to enter the amount of the selected item. This is all in a repeated region and displays fine.
I need to set up a session variable to contain each row of the database field where value of txtAmount > default (0). Then on submit button, do the calculations (eg if txtAmount value entered is 2 * price=total) and display on the redirect page, name & total price for each item selected.
So basically?! the catalogue page displays all items and an input box for amount, then redirects to the equivalent of a shopping basket. Hopefully this makes sense!
Attempted code for setting the session variable:
MM_valQuote=Request.Form("txtAmount")
For Each MM_Item in Request.Form
If (txtAmount.Value > 0) Then
Session("MM_Quote")=MM_valQuote
End If
Next
Retrieval code:
Response.Write Session("MM_Quote")
Pls can anyone HELP with suggestions on how to solve this or do the same thing another way? :confused:
I have a problem with setting up session variables! My ASP page displays the recordset database fields (name & price) with an input box for the user to enter the amount of the selected item. This is all in a repeated region and displays fine.
I need to set up a session variable to contain each row of the database field where value of txtAmount > default (0). Then on submit button, do the calculations (eg if txtAmount value entered is 2 * price=total) and display on the redirect page, name & total price for each item selected.
So basically?! the catalogue page displays all items and an input box for amount, then redirects to the equivalent of a shopping basket. Hopefully this makes sense!
Attempted code for setting the session variable:
MM_valQuote=Request.Form("txtAmount")
For Each MM_Item in Request.Form
If (txtAmount.Value > 0) Then
Session("MM_Quote")=MM_valQuote
End If
Next
Retrieval code:
Response.Write Session("MM_Quote")
Pls can anyone HELP with suggestions on how to solve this or do the same thing another way? :confused: