Tôi đang cố gắng tạo một biểu mẫu bằng cách sử dụng PHP và tôi không thể tìm thấy một hướng dẫn về những gì tôi cần để Id nghĩ hỏi tại đây.Nhận dữ liệu POST từ nhiều hộp kiểm?
Tôi có một tùy chọn hộp kiểm nhiều trên trang của mình ...
<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>
Tôi không chắc chắn tuy nhiên làm thế nào để thu thập tất cả checkbox giá trị sử dụng phương thức POST?
nếu tôi sử dụng
$service = $_POST['service'];
tôi chỉ nhận được 'khác' trở