should i use an array?
Posted: Thu Jun 16, 2005 8:37 am
i have a page with products we have available for use in our company. the page is setup with a form and a table listing the items. the column names are: Check, Quantity, Product, Manufacturer, and Unit Amt. The check column has a checkbox for the person to check that they want that item. the quantity varies - some items only have 1 available, while others have 2 or 3 available (there is a radio button if more than one is available so the person selects how many they want). Product is like model name, Manufacturer is manufacturer (duh), and Unit Amt amount in the container.
here's an example to try and clear this up:
Product001, Quantity=1, with a manufacturer of Manufacturer001 and Unit Amt of 1ml.
Product002, Quantity=3, with a manufacturer of Manufacturer002 and Unit Amt of 1Gallon.
Product002, Quantity=2, with a manufacturer of Manufacturer003 and Unit Amt of 1L.
so as you can see from the example, we may have items with the same product name but with different quantities, manufacturers and unit amounts. if the person selects Product002 with Manufacturer002 we will need to know how many of the 3 do they want - 1, 2, or all 3.
so here's what i need - on the page of 50 or so items, i need to take only the items selected in the Check column (those that have the checkbox checked) and email that information to the "shop keeper". he will need to know Quantity, Product, Manufacturer, and Unit Amt for those that were checked.
should i use an array to store those that were checked? if so, how would i setup the array? and how do i access the array in the email code to send the info to the "shop keeper"?
i know this is long and full of info, but any help you can provide is greatly appreciated.
here's an example to try and clear this up:
Product001, Quantity=1, with a manufacturer of Manufacturer001 and Unit Amt of 1ml.
Product002, Quantity=3, with a manufacturer of Manufacturer002 and Unit Amt of 1Gallon.
Product002, Quantity=2, with a manufacturer of Manufacturer003 and Unit Amt of 1L.
so as you can see from the example, we may have items with the same product name but with different quantities, manufacturers and unit amounts. if the person selects Product002 with Manufacturer002 we will need to know how many of the 3 do they want - 1, 2, or all 3.
so here's what i need - on the page of 50 or so items, i need to take only the items selected in the Check column (those that have the checkbox checked) and email that information to the "shop keeper". he will need to know Quantity, Product, Manufacturer, and Unit Amt for those that were checked.
should i use an array to store those that were checked? if so, how would i setup the array? and how do i access the array in the email code to send the info to the "shop keeper"?
i know this is long and full of info, but any help you can provide is greatly appreciated.