Re: [PHP4BETA] session_register() in a function...again

From: Date: Thu, 03 Feb 2000 21:20:22 +0000
Subject: Re: [PHP4BETA] session_register() in a function...again
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-9750@lists.php.net to get a copy of this message
On Wed, Feb 02, 2000 at 08:44:59PM -0800, Dave wrote: > Hi all, > > I saw the post about placing a session_register() in a function and about > how the var that you want registered needs to be global... > > My question is, how much more global does it need to be than the following? > > function check_something() { > global $var_to_reg; > if($something) { > session_register("var_to_reg"); > } > } > > I even set the var outside the function (in global scope) and tried > registering it inside the function...to no avail. > > The above will NOT start a session and obviously not register the var. If I > place the code in the global scope it does. > > Any ideas? Try a snapshot from <URL:http://snaps.php.net/>. -- Regards, Sascha Schumann Consultant

Attachment: [application/pgp-signature]
« previous php.version4 (#9750) next »