Session Name vs Session ID

Discussion in 'PHP' started by Tintumol, Mar 1, 2011.

  1. #1
    Is this correct?

    1 - PHP stores the "Session ID" in a variable named PHPSESSID

    2 - PHPSESSID is the "Session Name"

    3 - To display the "Session Name" use...
    echo htmlentities(session_name());

    4 - To display the "Session ID" use...
    echo session_id();

    AND...

    5 - So, do you ever want to change the "Session Name" from PHPSESSID?

    6 - If so why, when, & how?

    Thanks for any help
     
    Tintumol, Mar 1, 2011 IP
  2. webcodez

    webcodez Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    As far as I'm concerned the session id is only used for verification purpose (security reasons e.g.) and is indeed retrieved using the session_id function.
     
    webcodez, Mar 2, 2011 IP
  3. srisen2

    srisen2 Peon

    Messages:
    359
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    the sesion name is a variable that can be called while the session id is a lower level part of the session function that registers directly with the server and links to the ip the session id is unique to each user while the session name is simple a variable that each user can call and is stored in relation to their session id
     
    srisen2, Mar 2, 2011 IP