Re: Foreach POST VARS problem

From: Date: Fri, 15 Aug 2003 21:04:18 +0000
Subject: Re: Foreach POST VARS problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-159759@lists.php.net to get a copy of this message
hi, 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 (#159759) next »