Suggestions?
Posted: Thu Dec 16, 2004 2:07 pm
Hello All,
I was wondering if anyone had any ideas how to best accomplish something. I'm making an ordering system for an embroider. I'm at the part where I need to allow the user to enter a name that is going to be embroidered on each article, specific to size/color.
I'm creating a form based off a MySQL query that contains: Quantity, Size, Color. I am going to use the Quantity to create a line on the form for each item. (ie if the quantity=10 then there will be ten lines). Each line will have a textbox, the Size and the Color (so they can get the right name on the right size/color).
There can be more than one row returned is why I have the WHILE in there.
My question is, how can I get all of the info out of the form? I need to gather the size, color and text on each line of the form, which as you can see is dynamically populated.
Should I try arrays inside of arrays or joining arrays? I'm using SESSIONS too, but there could be 100+ items. I really have no clue, so any help is greatly appreciated, as always.
Philip
I was wondering if anyone had any ideas how to best accomplish something. I'm making an ordering system for an embroider. I'm at the part where I need to allow the user to enter a name that is going to be embroidered on each article, specific to size/color.
I'm creating a form based off a MySQL query that contains: Quantity, Size, Color. I am going to use the Quantity to create a line on the form for each item. (ie if the quantity=10 then there will be ten lines). Each line will have a textbox, the Size and the Color (so they can get the right name on the right size/color).
Code: Select all
#select all the quantities/size/color combos for this item
$sql_combos = mysql_query("select quantity, color, size from cart_contents where item_number = "762B" ");
while ( $row = mysql_fetch_array($sql_combos) )
{
for ($i=0;$i<$rowї"quantity"];$i++)
{
}
}My question is, how can I get all of the info out of the form? I need to gather the size, color and text on each line of the form, which as you can see is dynamically populated.
Should I try arrays inside of arrays or joining arrays? I'm using SESSIONS too, but there could be 100+ items. I really have no clue, so any help is greatly appreciated, as always.
Philip