Re: Safe way to get all variables

From: Date: Fri, 15 Sep 2000 18:31:38 +0000
Subject: Re: Safe way to get all variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-16964@lists.php.net to get a copy of this message
You have misunderstood the concept. When register_globals is set On, it means EGPCS (Environment, Get, Post...) variables are extracted into the global scope: $PHP_SELF, $action, $boo (from your querystring) etc. Otherwise, you can only access them through $HTTP_*_VARS arrays, provided <em>track_vars</em> is set on. As of 4.0.3-dev, track_vars is <em>always</em> on. At 11:06 AM 9/15/00 -0700, Joao Prado Maia wrote the following: -------------------------------------------------------------- >Hi everyone, > >I know this probably was already asked before, but I looked on the >archives for 30 minutes and didn't find a thing. > >The question is, how can I safely get all variables passed by a form or >by a "get" link ? > >That is, if I have a link >http://www.foo.com/index.php?action=1&boo=2, I >can get these two variables dynamically. > >I know I can use $HTTP_GET_VARS or $HTT_POST_VARS, but what if the >"register_globals" directive on php.ini is turned off ? How can I do the >same thing without these special arrays ? > >Joao > > >-- >Joao Prado Maia >Web Developer >Kefta, Inc. >T: (415) 391-6881 ext 8008 >F: (415) 391-7079 > >Marketers: Check out http://www.kefta.com for your next risk >free >acquisition campaign! > >Sign up for a Keftamail account today: the free email that pays! >http://www.keftamail.com/www/reg.php > > > > >-- >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 ICQ: 2808 2505

« previous php.general (#16964) next »