Jump to content

Tricky foreach statement...


jwwceo

Recommended Posts

I am building a page for adding a product to a database. The product can come in many many colors. The ADD PRODUCT page has fields at the top of the page which are pretty standard, size, price, etc. At the bottom of the page are a list of colors available. With a checkbox for each color the product comes in. However, there are other features that are unique to each color/product combination. For example there is another set of form fields next to each color..to indicate if the color/product combo comes in certain sizes or if there is an additional cost for each size/color/product combo. Kinda complicated.

you can look at it here... [url=http://www.vectortees.com/admin/addgarment.php]www.vectortees.com/admin/addgarment.php[/url]

Anyway, all the data about the colors is in a seperate table that links the product id with the color id as well as all the other info.

I have my main query set up to add the main product info to the product table, but I don't know how to name my form fields so that I can add everything to the product/color table.

I assume all the info, the 2x, 3x,  etc...will all be lised in an array and then some kind of foreach statement...I just can't get the exact syntax...

Any ideas....?? I hope this makes sense...
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.