Cant get values of checkboxes - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Cant get values of checkboxes (/showthread.php?tid=678) |
Cant get values of checkboxes - mastercho - 01-05-2015 Im trying to insert multiple checkboxes but cant get their values in codeigniter 2 this is my code in View PHP Code: <!-- Multiple Checkboxes (inline) --> PHP Code: public function InsertCheckbox() { PHP Code: $this->estate_m->InsertCheckbox(); EDIT... I have try to edit my code but still no result: PHP Code: public function edit()/*this is controller */ RE: Cant get values of checkboxes - bclinton - 01-05-2015 Perhaps this is a dumb question but are you checking your checkboxes? $this->input->post('checkboxes') will return false if none of them are checked. RE: Cant get values of checkboxes - Avenirer - 01-06-2015 Well... you did a foreach... but you didn't use the value (you used the array)... PHP Code: foreach($property_typesRequest as $value){ Also, if you do a foreach, why do you do an insert_batch(), and not an insert()? RE: Cant get values of checkboxes - mastercho - 01-06-2015 Problem sloved! http://stackoverflow.com/questions/27776228/cant-get-values-of-checkboxes-in-codeigniter Thanks for your time! |