Online Shopping : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to
Did You Find This Entry Useful?

174 of 236 people (74%) answered Yes
Recently 5 of 10 people (50%) answered Yes


What exactly is the use of PHPSESSID in a URL???

Mar 20th, 2008 16:57
ha mo, Philip Olson, mhykhh d,

Assuming you know what a session is (read the manual) the session id is 
what tells PHP who 'owns' the session data for that session id and that 
you are in fact that owner.  Typically people accept the session id as 
a cookie but this isn't always the case, not everyone excepts these 
cookies so the session id needs to be sent within the request 
somehow/somewhere so through the url (GET) is one method for this.  
PHPSESSID is the default session name, this can be changed, but that's 
not important here.
There are various PHP directives that come into play here, consider the 
following manual page:
  General SESSION information:
That manual page contains further information such as different ways to 
send the session id.