|
Posted by Jack Jackson on 08/02/05 21:13
Hi,
Thanks to everyone's help, that multipage monster of a form is now
working properly (yay!).
One problem I have though is that I stick the answers as each page is
completed into a table. If the user hits the back button, rather than
adding a new row to the table I'd rather update it if it's there. That's
fairly straightforward when it's 1:1 questions to answers:
$q_a_sql='INSERT INTO $userAnswerTable
( q_id, a_id )
VALUES ' . (implode(",",$qanda))
. ' on duplicate key UPDATE a_id = VALUES(a_id);';
But when it's 1:n, such as with checkboxes, this neat little plan of
mine is thwarted.
So if I change the userAnswerTable to three columns, u_id, q_id and
a_id, is there a way I can do all the 1:1 and 1:n in the manner I wish?
TIA,
JJ
Navigation:
[Reply to this message]
|