"return to" browse history links

Discussion in 'Programming' started by forumposters, May 30, 2007.

  1. #1
    Has anyone implemented a feature that allows the user to return to a section on your website that they were previously viewing? What's a good way to code this? Would you set session variables to CGI.SCRIPT_NAME on key pages that you'd like them to be able to go back too? Any good tutorials on this subject?
     
    forumposters, May 30, 2007 IP
  2. IsRoss()

    IsRoss() Peon

    Messages:
    116
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I would keep the user's history in a session based array that gets appended with each url as they visit a new page. You could then present them with a drop-down list of their history...
     
    IsRoss(), May 31, 2007 IP
  3. forumposters

    forumposters Peon

    Messages:
    270
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Is there a reason you would use an array rather than a struct? Or might either variable type work equally as well as the other?
     
    forumposters, Jun 18, 2007 IP
  4. drewbe121212

    drewbe121212 Well-Known Member

    Messages:
    733
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    125
    #4
    The only difference I know of is that Structures dont output in the same order that you assign them, while arrays will always stay in the order of their key.
     
    drewbe121212, Jun 18, 2007 IP