|
Posted by Oli Filth on 01/09/06 16:09
nescio said the following on 09/01/2006 14:04:
>>What HTML syntax are you using, and what PHP syntax are you using in
>>your foreach() loop?
>
>
>
> echo "<input type='hidden' name='headersKlant' value='" . $arrayHeaders .
> "'>";
Well, you haven't told us what $arrayHeaders contains, so it's difficult
to see what HTML this will result in. However, I'm pretty sure it won't
work.
The following will work, however:
<FORM action="process.php" method="GET">
<INPUT type="hidden" name="foo[]" value="apple">
<INPUT type="hidden" name="foo[]" value="bison">
<INPUT type="hidden" name="foo[]" value="car">
<INPUT type="submit">
</FORM>
In process.php, $_GET["foo"] will be an array containing those values,
which can be walked using foreach.
Be warned, though, that this HTML syntax is not W3C valid.
--
Oli
Navigation:
[Reply to this message]
|