RE: [PHP] Add Multiple Items, Qty to Cart from html form

2006-05-18 Thread Andras Kende
-Original Message- From: Wolf [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 17, 2006 9:47 PM To: Andras Kende Cc: php-general@lists.php.net Subject: Re: [PHP] Add Multiple Items, Qty to Cart from html form Andras, input type=hidden name=item[] value=applesApples input type=text name

Re: [PHP] Add Multiple Items, Qty to Cart from html form

2006-05-18 Thread Jochem Maas
Wolf wrote: Andras, input type=hidden name=item[] value=applesApples input type=text name=qty[] value=0 input type=text name=price[] value=0 a useful addition can be to use the item id in the 'key' of the input names (and always quoting your element attributes is highly recommended): input

Re: [PHP] Add Multiple Items, Qty to Cart from html form

2006-05-18 Thread Wolf
SNIP a useful addition can be to use the item id in the 'key' of the input names (and always quoting your element attributes is highly recommended): Yes, when I generate my cart I use the itemID as a key field (since the ID stayed the same but the # in the database could change). And ALWAYS

Re: [PHP] Add Multiple Items, Qty to Cart from html form

2006-05-18 Thread Richard Lynch
On Wed, May 17, 2006 6:59 pm, Andras Kende wrote: I trying to add multiple items to a shopping cart with selectable quantity and price form text field like.. apple : qty: [__] price: [__] orange : qty: [__] price: [__] apple : qty: input name=quantity[apple] / price: input

[PHP] Add Multiple Items, Qty to Cart from html form

2006-05-17 Thread Andras Kende
Hello, I trying to add multiple items to a shopping cart with selectable quantity and price form text field like.. apple : qty: [__] price: [__] orange : qty: [__] price: [__] Add Items to Cart I could add multiple items with checkboxes but without selecting quantity and price.. if

Re: [PHP] Add Multiple Items, Qty to Cart from html form

2006-05-17 Thread Wolf
Andras, input type=hidden name=item[] value=applesApples input type=text name=qty[] value=0 input type=text name=price[] value=0 Will get you where you need to go on the HTML side of things, then on the back end you need to process each array. By setting a default value of 0 for the qty, you