开发者

PHP Mysql Poll exam inserting?

开发者 https://www.devze.com 2023-01-17 14:58 出处:网络
table question: idquestion 1myquestion1 2myquestion2 3myquestion3 4myquestion4 5myquestion5 table answer: id qid useridanswer

table question:

id     question
1      myquestion1
2      myquestion2
3      myquestion3
4      myquestion4
5      myquestion5

table answer:

id qid userid    answer
1  1   1        myanswer
2  2   1        myanswer
3  3   1        myanswer
4  4   1        myanswer
开发者_运维技巧5  5   1        myanswer

My problem is how can i insert using php mysql for my answer after answering 5 questions? any one has an idea?

sample question: After clicking radio button go to next question then after answering submit and insert answer into database.. Are you married?

Yes

No

Do you play basketball?

Yes

No

ect....

Any help very much appreciated! Thank you!


array(
    ['question_id'] =>Yes //Are you married?
    ['question_id'] =>no  //Do you play basketball?
)

You need to get this array by posting answer data

0

精彩评论

暂无评论...
验证码 换一张
取 消