jwwceo Posted September 27, 2006 Share Posted September 27, 2006 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... Quote Link to comment https://forums.phpfreaks.com/topic/22317-tricky-foreach-statement/ Share on other sites More sharing options...
steveclondon Posted September 28, 2006 Share Posted September 28, 2006 an example of some code here that you have will be of some help Quote Link to comment https://forums.phpfreaks.com/topic/22317-tricky-foreach-statement/#findComment-100093 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.