从多个复选框获取开机自检数据?
我试图使用PHP创建一个表单,我似乎找不到我需要什么的教程,所以认为Id在这里问。
我的页面上有多个复选框选项...
<li>
<label>What service are you enquiring about?</label>
<input type="checkbox" value="Static guarding" name="service">Static guarding<br>
<input type="checkbox" value="Mobile Patrols" name="service">Mobile Patrols<br>
<input type="checkbox" value="Alarm response escorting" name="service">Alarm response escorting<br>
<input type="checkbox" value="Alarm response/ Keyholding" name="service">Alarm response/ Keyholding<br>
<input type="checkbox" value="Other" name="service">Other<input type="hidden" value="Other" name="service"></span>
</li>
我不确定如何使用POST方法收集所有复选框值?
如果我使用
$service = $_POST['service'];
我只得到“其他”返回