garblar, forgive me of my ignorance. I believe I understand the concept but I'm not sure how to use it.
foreach($_POST[PRODUCTNAME] as $value){
//enter row in third table with product=productname, theme=$value }
When I go to insert my data, what is the variable I need to use?
Here is the code I'm using to insert my data to my database (simplified):
PRODUCT TABLE
$sql = "INSERT into Products (product_name) VALUES ('$product_name')";
THEME TABLE
The Theme table has preassigned values. New themes are not inserted in this table.
PRODUCT_THEME_RELATIONSHIP TABLE
$sql = "INSERT into Product_Theme_Relationship (prodID, theme) VALUES ('$prodID', '$theme')";
Note: The prodID is read by using SELECT COUNT earlier in the script.
Note: There may be multiple database entries (INSERT) for the Product_Theme_Relationship query.