Re: Foreach POST VARS problem

From: Date: Fri, 15 Aug 2003 21:19:33 +0000
Subject: Re: Foreach POST VARS problem
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-159761@lists.php.net to get a copy of this message
btw! if you use it inside a function, you need to declare it as global! Catalin > Are you sure the data is posted from HTML > through POST ? try adding the lines below: > > > $colors=""; > if(is_array($HTTP_POST_VARS) && !empty($HTTP_POST_VARS )) { > > foreach($HTTP_POST_VARS as $ThisVar=>$ThisVal){ > > if(ereg("color-", $ThisVar) AND $ThisVal=="on" OR > > $ThisVal==1){ > > $newVarA=explode("-", $ThisVar); > > $colors.="$newVarA[1]:"; > > } > > } > } > > Catalin > >

« previous php.general (#159761) next »