Re: passing variables - php.ini?
| From: | DL Neil | Date: | Mon, 25 Feb 2002 13:17:42 +0000 |
| Subject: | Re: passing variables - php.ini? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-86081@lists.php.net to get a copy of this message | ||
Matt,
> thanks a lot!
> works fine now i've changed register_globals.
=great!
> just out of interest, what is the 'newer' way?
> is it using sessions etc, or something else i don't know about?
> or should i rtfm? ;)
Yes it is quicker for me to say "RTFM <reference>", although I wonder if it
isn't perceived as slightly rude
when I use the acronym in such a context...
Preferred approach is to use: "$HTTP_COOKIE_VARS['username']" rather than
"$username".
RTFM security issues in http://www.php.net/manual/en/security.registerglobals.php
which gives a good reason NOT
to do what I suggested earlier (!?) and shows code illustrating/contrasting the two methods.
The annotated manual is (perhaps surprisingly for open source) v.good and easily handled. Chucking
"globals" at
the built-in search facility will also render a wealth of further reading - including globals in
'sessions'.
Have fun!
=dn