put a lot of items in a shopping cart at once
- From: Mike Biggi <gtgtf@xxxxxxxxxxxxxx>
- Date: Sat, 01 Oct 2005 15:52:45 -0700
I have a form that is generated dynamically. The form has a bunch of images in a table with a check box for each image. I want it so the customer can check the box for each item he wants and then post the form to a new page where the customers sees only his selections and a field to choose quantities for each part he wants to order (I have already done that part). The names of the fields are created dynamically, and I have no way of knowing which ones to add in the for post (.php?32435=3&8787=23&77687678=2) like I normally would do when I post a form. If I try to step through the array I end up adding stuff twice, so there has got to be a better way. How do I tell PHP to process the item number and quantity as part of one record?
example:
customer chooses stock number 72132 and 37332, so I take him to a form that has only the items he chose in the previous form. Now I need him to give me the quantities of each item he wants, so I build a new form that has $stocknumber . "quantity" as the form field name. Posting this new form results in a foreach loop seems to post each form var as a new record, instead of stock number and quantity as a single record.
Bottom Line? How can I add stuff in bulk (20 to 30 items at once) to a shopping cart?
.
- Follow-Ups:
- Re: put a lot of items in a shopping cart at once
- From: ccisystems
- Re: put a lot of items in a shopping cart at once
- Prev by Date: How to read more files in .gz tarball using Zlib?
- Next by Date: overlading constructor and functions in PHP 4
- Previous by thread: How to read more files in .gz tarball using Zlib?
- Next by thread: Re: put a lot of items in a shopping cart at once
- Index(es):
Relevant Pages
|
|