Re: multiple textboxes
Hi,
You can use the array style:
<? foreach ($items as $it) { ?>
<input name=qty[<?= $it['id'] ?>] type=text>
<? } ?>
You can read the submitted values back like so:
foreach ($_REQUEST['qty'] as $id => $val) {
echo "Item $id has quantity $val.<br>"
}
Regards,
John Peters
On Mar 8, 6:26 pm, "Bob Bedford" <b...@bedford.com> wrote:
> Hi all,
>
> I do build an item list using a SQL query. I'd like the person being able to
> define a quantity for each item using an input type="text" in the list the
> reuse it when the datas are passed to an other script. The problem is how to
> name the text as they can be passed to an other script ?
>
> Thanks for helping.
>
> Bob
|