I rookie A, recently encountered a questionnaire survey procedures, such as how to insert a database?
Record table in database: Result
Fields inside: Q1, Q2, Q3, Q4
corresponding to four questions respectively.
Insert a record and insert four values into the corresponding field. How do we insert this? Here I only listed four questions, but there are a lot of problems behind, it is impossible to insert a corresponding one.
My idea is that name is the beginning of the Q, followed by the sequential sequence number, and the inserted data table, which corresponds to the respective. Is it possible to insert through loops?
Which hero gives an inserted code? Thanks here!!
Here are radio, there is a checkbox, behind the text, through the $_post how to deal with it?
Reply to discussion (solution)
The checkbox requires an array in order to get all the values in the form, like this
The checkbox requires an array in order to get all the values in the form, like this
Can you give me an example? How do I iterate through the database?
After their own constant groping, finally solved.
Set a field, then insert a value into this field, and the other data is updated to this record.
The above is about a questionnaire survey procedures, how to insert a database? For more information, please pay attention to topic.alibabacloud.com (www.php.cn)!