Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    May 2007
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question asp, problem such as shopping cart

    hallo all..i got some problem in using the session in ASP. i hope u all can guide me in detail.
    i have a form, inside got 3 drop down and one text box. and got one Add button. wat i wan to do is:
    after fill in the value for this form, then click the add button and it will display the value in the 2nd page. the data hasnt insert into the database yet. then when user click on continue button in the 2nd page, it can add another new record , etc...until the user click on the FINISH button on the 2nd page, then all the records will insert into DB. it is same as the shopping cart ...but i duno how is work?

    can someone plz teach me how to keep the record from the form as session? how is it work ..plz help....
    thank you

  • #2
    Regular Coder
    Join Date
    Mar 2006
    Location
    Sumter, SC
    Posts
    178
    Thanks
    10
    Thanked 4 Times in 4 Posts
    To store the field in a session variable:
    <%
    Session("InsertVariableName") = Request.Form("InsertFormFieldName")
    %>

    To display the session variable:
    <%
    Response.Write Session("InsertVariableName")
    %>

    Further information can be found at: W3Schools.com

  • #3
    New Coder
    Join Date
    May 2007
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hi DakotaChick , can tell me more?
    how can i continuous add the product without submit into database ? i wan to do , when i add 1st product, it weill display the product name, price, quantity at the 2nd page. then i continue to add more products, every time add one product, the 2nd page will add up the products price total. how can i do that? plz help..plz..thank you.

  • #4
    New Coder
    Join Date
    May 2007
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts
    halo there..i need some help in this problem.
    i have a form for users to choose which product to order. inside this form , consists of 3 select drop down, every drop down will store the product id, priceid and promotionid. and then have another text box is to fill in the quantity. here have two button, one is calcualte the total amout of the product price * quantity and another button is Add..when the users click on the add button, it will go to the next page which will display the products info that the user has choose. if the user go back to the form page and choose another products, then the second page will add on one row for the new product choose and the total price = first product total price+the second product total price and so on.....in the second page have one Check out button, where..when the user click on it. all the product infor will insert into the database...may i know how to do the coding about this? how cna i use the cookies? can someone plz help me to start the coding? how to store the multiple value from the form in the cookies ?and then how can retireve each of it? plz help..i m poor on this..hope u all can give me some responses..plz..thank you.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •