Php作为一个在线考试系统,不太擅长做选择题。希望大神能就如何做选择题和选择题数据库提供帮助。
给你举个栗子,你应该能看懂。
这是html:
& lt表单操作= "。/test . PHP " method = " post " & gt;
你喜欢什么语言?
& ltbr & gt
& ltinput type = " checkbox " name = " yuyan[]" value = " PHP " & gt;php & ampnbsp& ampnbsp
& ltinput type = " checkbox " name = " yuyan[]" value = " Java " & gt;java和。nbsp& ampnbsp
& ltinput type = " checkbox " name = " yuyan[]" value =。net " >;。网络& ampnbsp& ampnbsp
& ltinput type = " checkbox " name = " yuyan[]" value = " js " & gt;js & ampnbsp& ampnbsp
& ltbr & gt
& ltinput type = " submit " value = " submit " & gt;
& lt/form & gt;
前端效应:
这是php:
& lt?服务器端编程语言(Professional Hypertext Preprocessor的缩写)
$ yuyan = $ _ POST[' yuyan '];
回声' & ltpre & gt';
var _ dump($ yuyan);
php接收数据后的输出效果: