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... www.vectortees.com/admin/addgarment.php
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...
Tricky foreach statement...
1 reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users