Of course, silly me! Thanks!
So, the productoption table is now updated, and I've fixed another problem so that the OptionGroupID is correctly inserted.
However, currently the productoptions table is entering all 16 options, regardless of which checkboxes were ticked. Presumably the insert code needs to enter either 1 or 0 to ensure that only the chosen options are inserted into the productoptions table.
So you can see what I'm talking about, here is the header and some lines from the productoptions table. Although only a few of these option were selected, they are all appearing in the table:
ProductOptionID ProductID OptionID OptionGroupID OptionPriceIncrement
33 9 1 1 NULL
34 9 2 1 NULL
35 9 3 1 NULL
36 9 4 1 NULL
37 9 5 1 NULL
38 9 6 1 NULL
39 9 7 1 NULL
40 9 8 1 NULL
41 9 9 1 NULL
I've looked through the code and can't see where one would modify the SQL insert to show 0,1 (if indeed this is the right way of doing it anyway). Or perhaps there needs to be an "if checkbox is selected insert; else do nothing".
(I'm about to add similar modifications to the products_Detail and products_Update pages so we can see which options have been chosen for any particular product. I think I can work out what to do for these, but we'll see!)
Here's the most recent version of the products_Insert page.
Thanks for your continued help.