note 69131 added to faq.misc

From: Date: Thu, 24 Aug 2006 08:08:20 +0000
Subject: note 69131 added to faq.misc
Groups: php.notes 
Request: Send a blank email to php-notes+get-116253@lists.php.net to get a copy of this message
Remember that 'globalizing' $_SESSION like this only does half the job. It makes "read-only" globals. Any changes you make don't get written back to $_SESSION when the script ends. You either have to do that manually, or, instead do something like: $MyVar = &$_SESSION['MyVar']; This makes $MyVar into a reference for $_SESSION['MyVar'], so, every time you change $MyVar, it really changes the value in $_SESSION - thus, at the end of the script, when $_SESSION gets saved, your changes get saved as well. ---- Server IP: 66.163.161.117 Probable Submitter: 194.143.169.103 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/faq.misc.php Edit -- https://master.php.net/note/edit/69131 Del: integrated -- https://master.php.net/note/delete/69131/integrated Del: useless -- https://master.php.net/note/delete/69131/useless Del: bad code -- https://master.php.net/note/delete/69131/bad+code Del: spam -- https://master.php.net/note/delete/69131/spam Del: non-english -- https://master.php.net/note/delete/69131/non-english Del: in docs -- https://master.php.net/note/delete/69131/in+docs Del: other reasons-- https://master.php.net/note/delete/69131 Reject -- https://master.php.net/note/reject/69131 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#116253) next »