How to insert a questionnaire into a database

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.