RE: [PHP] Session variable scope - surprise!
| From: | Richard Black | Date: | Mon, 04 Mar 2002 16:17:00 +0000 |
| Subject: | RE: [PHP] Session variable scope - surprise! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-87119@lists.php.net to get a copy of this message | ||
I just read further on the manual page for session_register. It also
contains the following:
Caution
This registers a global variable. If you want to register a session variable
inside a function, you need to make sure to make it global using global() or
use the session arrays as noted below.
Richy
==========================================
Richard Black
Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com
Tel: 0141 435 3504
Email: rblack@datavisibility.co.uk