Re: register_globals setting
| From: | Cynic | Date: | Thu, 04 Jan 2001 15:07:24 +0000 |
| Subject: | Re: register_globals setting | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32639@lists.php.net to get a copy of this message | ||
I've used register_globals off since I started using PHP (well,
almost). It is faster, more secure, doesn't spoil the global
scope, and provides more flexibility.
Anyway, what's the exact problem you have with the snippet?
Does PHP issue an error or something?
At 15:34 4.1. 2001, Todd Cary wrote the following:
--------------------------------------------------------------
>Phil -
>
>My question is whether there is a "preferred way" by the folks on this
>list. One of my problems has to do with setting a Cookie. If I pass a
>variable to a page (GET or POST) and I want to save it to a Cookie at
>the top of the page, it appears that I cannot do it if my first line is
>
> $myvar = $HTTP_POST_VARS[myvar];
>
>Then
>
> setcookie("myvar", $myvar);
>
>I have always had register_globals turned off, but I may have to turn it
>on if I want to set a cookie like in the above example. But do
>understand that I have not tried PHP with register_globals turned ON.
>
>Todd
>
>--
>Todd Cary
>Ariste Software
>todd@aristesoftware.com
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
>For additional commands, e-mail: php-general-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
------end of quote------
____________________________________________________________
Cynic:
A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.
cynic@mail.cz