I have a problem I have so far always worked around, simply by avoiding radio buttons, but I feel that I should now focus on solving this one....with your help of course.
Here's the scoop:
I'm building a questionaire. I have a database table with questions with the columns:
id, nr, question
Where id is the index, unique and autoincremented, nr is the 'depth' to indicate in which order the questions will be, and question is the question.
Using this table I print an overview of questions with two radiobuttons, true and false.
<input type=\"radio\" name=\"q1" value=\"1\"> True
<input type=\"radio\" name=\"q1" value=\"0\"> False
The results are supposed to go into a new table in a row with the columns:
id, qID, answer
Where id is again the index, unique and autoincremented, qID is the id of the question and answer is either 1 or 0 (true or false).
And then things go boink. I can't figure out how to get the data into the database properly. I've tried to use the id of the question as radiobutton name, but then I end up with variables that have a name I don't know.
Can anybody give me a hint?
Cheers