Re: problems using $HTTP_GET_VARS

From: Date: Fri, 21 Jul 2000 23:47:38 +0000
Subject: Re: problems using $HTTP_GET_VARS
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-7648@lists.php.net to get a copy of this message
karin wrote: > > "Warning: Variable passed to each() is not an array or object in > /home/httpd/html/sourceforge/www/testphp.php on line 11" > > ---- this happens when i try, for instance, the following: > > while(list($k,$v) = each ($HTTP_GET_VARS)) { > printf("name %s, wert %s", $k, $v); > } Two things. If your each() statement is in a function, you need to declare the get vars as global: "global $HTTP_GET_VARS;" Also, your track_vars Configuration variable needs to be turned on. Run phpinfo() and see if it's set to 1. If it's 0, you need to change your php.ini or your .htaccess. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y More than just answers. Solutions. (SM) http://www.analysisandsolutions.com/ 4015 7 Av #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.general (#7648) next »