note 30462 added to ref.session

From: Date: Tue, 18 Mar 2003 22:36:09 +0000
Subject: note 30462 added to ref.session
Groups: php.notes 
Request: Send a blank email to php-notes+get-45484@lists.php.net to get a copy of this message
Note that session_register() is a function, whereas $_SESSION is an array. For instance if you send a variable, "v", with a querystring as e.g. mypage.php?v=1 you can register this variable AND its value simply by: session_register("v"); But thinking that this is euqal to $_SESSION['v'] is wrong, because the FUNCTION session_register() also registers the value of "v" (already sent with the querystring), whereas $_SESSION['v'] will only register the variable, but not its value. If the value is sent by a querystring, it can be registered by: $_SESSION['v']=$v; -- http://www.php.net/manual/en/ref.session.php http://master.php.net/manage/user-notes.php?action=edit+30462 http://master.php.net/manage/user-notes.php?action=delete+30462 http://master.php.net/manage/user-notes.php?action=reject+30462

« previous php.notes (#45484) next »