我想發佈複選框值並存儲它,但我的帖子值顯示爲on。在php中發佈複選框值
查看
<label for="name">Programme Applied for:</label><br>
<br>
<input name="program" type="checkbox">Six Months Computerized Accounting Diploma<br>
<input name="program" type="checkbox">Six Months Computerized Accounting Diploma<br>
<input name="program" type="checkbox">Two Months Diploma in taxation (Direct)<br>
<input name="program" type="checkbox">Three Months Diploma in taxation (Direct & Indirect)<br>
<input name="program" type="checkbox">One Year Diploma in Accounting Finance Taxation <br>
<input name="program" type="checkbox">Banking and Payroll
<br><br>
<div class="clear"></div>
<div class="text-danger"><?php echo form_error('program'); ?></div>
控制器
$data=array('prg_applied' => $this->input->post('program'));
$insert = $this->firstmodel->insert_record($data);
你已經有值字段 –