Getting POST data in loop - 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: Getting POST data in loop (/showthread.php?tid=76643) |
Getting POST data in loop - fci_alex - 06-05-2020 Sorry for my English I update the database table from the model, getting the id of the current record and field values through the controller. Everything is working fine: Code: function update_record(){ I want to get the form fields (their names = the names of the table fields) and their values in the loop. Something like this: Code: $fields = $this->db->list_fields('doc_prod_request'); But naturally, such a construction does not allow writing the assignment of values to variables: Code: $this->db->set($field, $field); They are overwritten. Tell me how this can be implemented. Thanks in advance. |