note 31799 added to function.session-id

From: Date: Sun, 04 May 2003 06:51:38 +0000
Subject: note 31799 added to function.session-id
Groups: php.notes 
Request: Send a blank email to php-notes+get-47486@lists.php.net to get a copy of this message
Regarding Thomas' note above about using SID as part of the URL; I'd advise against passing the session ID between pages in a URL using header(), as it leaves open the possibility of session stealing. Instead you should use: session_start(); $_SESSION['sess_id'] = session_id(); header("Location:whatever.php"); You can then reference the same session in whatever.php without exposing the session ID, or leaving open the possibility somebody will bookmark a URL with a session ID in it and try to access it later. -- http://www.php.net/manual/en/function.session-id.php http://master.php.net/manage/user-notes.php?action=edit+31799 http://master.php.net/manage/user-notes.php?action=delete+31799 http://master.php.net/manage/user-notes.php?action=reject+31799

« previous php.notes (#47486) next »