![]() |
checkbox arrays - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: checkbox arrays (/showthread.php?tid=30642) |
checkbox arrays - El Forum - 05-21-2010 [eluser]elmne[/eluser] I'm trying to retrieve checkbox values from an array so that the checked id numbers in the array can be processed. I do it like this In the view, i declare the checkbox like this Code: <tr> Then when the form is submitted, i try to process it like this Code: $checked = $this->input->post('checkbox[]'); Followed by the sql command that uses Code: '".$checked[$i]."' But it gives me an error. The sql command fails to work even though no error is shown. What's wrong with the above code? checkbox arrays - El Forum - 06-11-2010 [eluser]daelsepara[/eluser] you can try this code: Code: $checked = $this->input->post('checkbox'); |