note 18940 added to function.session-id

From: Date: Sun, 10 Feb 2002 16:22:04 +0000
Subject: note 18940 added to function.session-id
Groups: php.notes 
Request: Send a blank email to php-notes+get-26452@lists.php.net to get a copy of this message
It isn't a good idea to call session_id(SID) as suggested above, because the SID contains not only the session id but also the session name and equal sign, for instance it may have something like "PHPSESSION=0adaf898da38c8c2066386dfd1eeb08astant ". OTOH, if you want to use a session id that comes from an URL, and you want to override any session id that could stored as a cookie, what you should do is something like : session_id($HTTP_GET_VARS[session_name()]) (provided you have track_vars enabled) -- http://www.php.net/manual/en/function.session-id.php http://master.php.net/manage/user-notes.php?action=edit+18940 http://master.php.net/manage/user-notes.php?action=delete+18940 http://master.php.net/manage/user-notes.php?action=reject+18940

« previous php.notes (#26452) next »