session_register() in a function...again
| From: | Dave | Date: | Thu, 03 Feb 2000 04:44:59 +0000 |
| Subject: | session_register() in a function...again | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-9713@lists.php.net to get a copy of this message | ||
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?
PHP4b3
Apache 1.3.9
-Dave