Help with cookies

Discussion in 'JavaScript' started by brogart28, Feb 24, 2007.

  1. #1
    I am currently trying to develop a project based on a shopping cart scenario. I want to link the total price of product 1 on page one and the total price of product 2 on page 2 and the same for product 3 and product 4. I then want them all to be displayed on the shopping cart page.

    I have no idea of how this should opperate except through cookies.

    Any help would be greatfully appreciated.
     
    brogart28, Feb 24, 2007 IP
  2. yourihost

    yourihost Well-Known Member

    Messages:
    1,708
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    115
    #2
    yourihost, Feb 24, 2007 IP
  3. Aragorn

    Aragorn Peon

    Messages:
    1,491
    Likes Received:
    72
    Best Answers:
    1
    Trophy Points:
    0
    #3
    You shouldn't be using Cookies for that. Someone can edit your cookies and change the price. You can use PHP sessions for that purpose. It allows you to track the products through out the current session of the user. Check
    http://www.php.net/session
    http://www.tizag.com/phpT/phpsessions.php
     
    Aragorn, Feb 24, 2007 IP