Re: Problems with HTTP_POST_VARS
| From: | Chris Lee | Date: | Fri, 24 Nov 2000 10:46:27 +0000 |
| Subject: | Re: Problems with HTTP_POST_VARS | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27071@lists.php.net to get a copy of this message | ||
unless you choose a terrbile way of doing things, and thus loose alot of
portability . ie
<input type=text name=var1 value='whatever'>
<input type=text name=var2 value='whatever'>
<input type=text name=var3 value='whatever'>
Im not sure why you can't use an array, I havent seen such a reason why
not. please explain.
even if this, you can easily use it.
page1
----
$a[] = 1;
$a[] = 2;
$a[] = 3;
$b[] = 4;
$b[] = 5;
$b[] = 6;
$c[] = 7;
$c[] = 8;
$c[] = 9;
<input type=text name=var[] value='$a'>
<input type=text name=var[] value='$b'>
<input type=text name=var[] value='$c'>
page2
----
foreach($var as $var_pos => $var_val)
foreach($var_val as $pos => $val)
echo "$pos : $val <br>\n";
Chris Lee
Mediawaveonline.com
In article <007a01c05650$6e2a1d00$1da3e6c8@durand.com.br>,
rafael@durand.com.br wrote:
>> Read the FAQ.
>>
>> Use name=data[]
>
> The problem is that I can`t use this method, because the data is
> returned in a array, and, in this case, there are some reasons to not
> use this.
> If I configure the form with GET method, all fields are send with
> the
> method that I need, but I can`t use GET ( others reasons )
>
> Rafael
>
>