Input Problem when use Checkbox form |
[eluser]dimasedu[/eluser]
I having problem when i use checkbox form to insert data into database, This the Error code : A PHP Error was encountered Severity: Notice Message: Undefined offset: 3 Filename: controllers/kelas.php Line Number: 156 A PHP Error was encountered Severity: Warning Message: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\simenko\system\libraries\Exceptions.php:166) Filename: helpers/url_helper.php Line Number: 541 and this is The Controller code: function tambah(){ $nis = $this->input->post('cid');//this is checkbox form $nama = $this->input->post('nama'); $kelas = $this->input->post('kelas');//this is array {<input type="hidden" name="kelas[]" value="10A" >} i put this into form //the input code for($i=0,$i<=count($nis);$i++){ $kode = $nis[$i]; $kls = $kelas[$i]; $this->siswa_model->inputpindahkelas($data); } redirect('siswa/formpindahkelas'); } but the error appears when my program run on windows, if I use linux to run normally, I use BLANKON linux Is there that can help me solve this problem?
[eluser]maria clara[/eluser]
have you loaded url_helper and form_helper?? Code: $this->load->helper('url','form');
[eluser]dimasedu[/eluser]
I've put $ this-> load-> helper ( 'url', 'form'); the autoload file. the problem is why the problem occurs only when the program runs on Windows, and running smoothly while in Linux |
Welcome Guest, Not a member yet? Register Sign In |