Turning variables into sessions

Discussion in 'PHP' started by Seqqa, Oct 31, 2008.

  1. #1
    How can I change a normal variable into a session so I don't have to keep passing it along each page?

    + rep!
     
    Seqqa, Oct 31, 2008 IP
  2. exodus

    exodus Well-Known Member

    Messages:
    1,900
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    165
    #2
    start_session at the beginning of each page. Then $_SESSION['var']; after that to get the vars each time; but if they leave the webpage they will have to redo the session when they came back.
     
    exodus, Oct 31, 2008 IP
    Seqqa likes this.