Actually for me it isn't unclear at all:

The (super-) global variables are created when php starts working on
your script.

That pesky function/ini parameter (register_globals=on) is just a
replacement for an extract() on each of the global vars just then.

Whatever you do later with any of the variables is up to you - that
extract won't 'run' again - even with register_globals on

Similar to this: if you change some $_POST or $_GET var 'manually' the
$_REQUEST doesn't get updated ...

Richard


Thursday, April 15, 2004, 1:35:19 PM, you wrote:

> On 14 April 2004 17:53, Paul Fine wrote:

>> Thanks guys but I have register globals ON so once the
>> session variable is
>> defined I should be able to address it without specifying $_SESSION ?

> I don't think the documentation is clear on this point -- it may be that the
> association between the global variable and the $_SESSION array doesn't
> "take" until the next page load and session_start(), and in any case the
> behaviour seems to be different between 4.2 and 4.3.  I *think* you may have
> to session_register('element_countp') to make the association in the current
> page, but this is buggy and seriously disrecommended in 4.2 (although fixed
> in 4.3).

> Personally, I'd just use the $_SESSION[] variable anyway, and not bother
> with the equivalent global.

> Cheers!

> Mike

> ---------------------------------------------------------------------
> Mike Ford,  Electronic Information Services Adviser,
> Learning Support Services, Learning & Information Services,
> JG125, James Graham Building, Leeds Metropolitan University,
> Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
> Email: [EMAIL PROTECTED]
> Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to