How can I insert a questionnaire into a database? & Lt; form & nbsp; actionsumbit. php & nbsp; methodpost & gt; & nbsp; Q1, the first question? & Lt; br & gt; & lt; input & nbsp; typeradio & nbsp; nameq1 & nbsp; value male & nbsp; & gt; male & lt; how can I insert a database into a questionnaire survey procedure?
I am a newbie and recently encountered a questionnaire survey program. how can I insert a database like this?
Record table in database: result
The fields are q1, q2, q3, and q4.
They correspond to four problems.
Insert a record and insert the four values into the corresponding fields. How can this be inserted? Here I only list four problems, but there are still many problems that cannot be inserted one by one.
My idea is that names start with q, followed by sequence numbers, and the inserted data tables correspond to each other. Can it be inserted through loops?
Which of the following heroes inserts code? Thank you !!
Here there are both radio and checkbox, followed by text. what should I do through $ _ POST?
------ Solution ----------------------
In the checkbox, an array is required to obtain all values in the form, as shown in the following figure: Good
, After the submission, all values will be in $ _ POST []. it should be possible to loop.