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: price: orange : qty: price: > > > I could ad

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

2006-05-18 Thread Wolf
> 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 quote

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

2006-05-18 Thread Jochem Maas
Wolf wrote: Andras, Apples 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): Apples that way you can easily fish out the quantities when looping the selected items (example mostly ignores input

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, Apples Will get you where you need to go on the HTML side of things

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

2006-05-17 Thread Wolf
Andras, Apples 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 force users to change the values, but you also keep your arrays intact and easier (IMHO) to deal with. Wolf Andra

[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: [__] I could add multiple items with checkboxes but without selecting quantity and price.. if (isset($_POST['item