![]() |
Values from textbox array not updating - 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: Values from textbox array not updating (/showthread.php?tid=72912) |
Values from textbox array not updating - zeus2026 - 02-27-2019 Hi guys, Im new in this forum and i'm having a hard time updating selected value from checkbox coming from the textbox value. Scenraio: I want to update selected items, For example I want to update Item-2 and the textbox from item recieve will be enable, I will enter a number for example 1 and the textbox from total receive will automatically sum using ajax. The problem is after submiting the value from total recieve the records that was updating is blank, but when I try to check and print_r the value is there. And one more thing if all checkbox are all checked and enter a number for each item recieve, the value that it only get is the last value and will be updated will all selected checkbox. Note: Checkbox is an array Textbox from total recieve is an array Can you guys please help me? Here's my UI: ![]() Here's my code. Controller: Code: public function recitem_insert(){ View: Code: <form method="post" action="<?php echo base_url() ?>user/recitem_insert"> Model: Code: public function modUpdatedynamicval($table, $column, $data, $equal_to){ Any help will be gladly appreciate. Thank you.. EDIT: Lets assume, I've input 1 in item_receive textbox one and the total recieve will be 10, 2 in item_receive textbox two and the total recieve will be 11, 3 in item_receive textbox three and the total recieve will be 12, ![]() CODE: Code: $check = $this->input->post('check'); OUTPUT: Code: Check ValueArray ( [0] => 1 [1] => 2 [2] => 3 ) But If I only inout the second textbox here's the output: Code: Check ValueArray ( [0] => 2 ) RE: Values from textbox array not updating - zeus2026 - 02-27-2019 Please help... T_____T |