开发者

PHP Mysql Poll exam inserting?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜