SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Talk to the /dev/null Theiggsta's Avatar
    Join Date
    Mar 2001
    Location
    Tampa, FL
    Posts
    376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Quick shopping cart problem...need suggestions

    Hiya,
    I am having some minor troubles trying to make my little "continue shopping" button have an automatic redirect to the page visited before the user clicked on view cart or add item.

    I have thought of putting this in a session tbale in the database...but how do I know how to makesure it doesnt overwrite?

    Any suggestions/tips would be greatly appreciated.
    Aaron "Theiggsta" Kalin
    Pixel Martini
    Ruby and Rails Developer

  2. #2
    SitePoint Enthusiast kcabobert's Avatar
    Join Date
    Aug 2001
    Location
    Topeka, KS
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use $HTTP_REFERER I use it to return people to a previous page like this:
    PHP Code:
    $returnto "$HTTP_REFERER";
    header ("Location: $returnto"); 
    then if I know they will be going through several pages before returning I pas the $returnto variable from page to page. It will need defined on the appropriate page of course. That seems to work well for me.
    Microsoft's Motto: Resistance is futile, you will be assimilated.

    My dog's name is Jade; she is a Miniature pinscher.
    Click here to see some of her pictures

  3. #3
    Talk to the /dev/null Theiggsta's Avatar
    Join Date
    Mar 2001
    Location
    Tampa, FL
    Posts
    376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well im in the weary side of hackers trying to hack the script...so I guess ill attempt storing it int he session variable somehow...

    thanks a bunch kcabobert

    Aaron "Theiggsta" Kalin
    Pixel Martini
    Ruby and Rails Developer


Bookmarks

Posting Permissions

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