|
Posted by Jim Dornbos on 02/16/06 22:03
I'm not sure which part needs fixing - consider all of it fair game
for suggestions.
I'm working on a site that allows users to select a postcard to mail.
They can also select a predefined note to place on the postcard. Not
all notes go will all postcards.
So - I have 3 tables: cards with cardID, cardDesc, cardFront,
cardBack, cardActive, notes with noteID, noteDesc, noteImage,
noteActive and finally I have cardnote with just cardID and noteID -
showing the pairs that work together.
My problem shows up in the notes admin area. I currently build a list
of potential cards to select from with checkboxes named by cardID.
When the form is submitted, I end up with an unknown number of
"[104]=>on, [147]=>on, [116]=>on" in my POST results - depending on
how many cards they figured this note works with. (I can't just check
for "on"s as the cardActive setting is also presented as a checkbox...
at least for now.)
If I'm working with note 117 at the moment, I need to insert the pairs
(104, 117), (147, 117) (116, 117) into cardnote.
I could use some help with the "right" way to handle this. I'm unsure
if I need to change the way it's presented on the web page, or the way
I have it stored in the database or just some more advanced php
handling of what's already there.
thanks
Jim
[Back to original message]
|