I have a page displaying products, once its displaying them, you are able to select how many qty you want from each one...
So I am generating automatic:
<input type="text" name="<? echo "$id"; ?>" size="5">
so the name of the filed would be the id of the product (and it could be any #, some have been deleted therefore there is no #2 already:
$82 which = 4
$12 which = 2
$79 which = 24
Now, when I post information: I want to be able to store them
order_id id order_qty
273457 82 4
273457 12 2
273457 79 24
So I was thinking of using foreach $id # that is more than 0, INSERT into database $order_id, $id, $order_qty
Any help in this is greatly appreciated
P.s. - My idea here is not to input 0's into database, as it would be useless, so if there was a product 14 that was not selected, there is no point of enlarging database.
Thanks