![]() |
Trying to understand forms - 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: Trying to understand forms (/showthread.php?tid=64544) |
Trying to understand forms - doomie22 - 03-02-2016 Hi all, I feel I am so close to getting my first form to work, I just cannot understand how to process what is setup. I have the following: PHP Code: <?php echo form_open('login/settings'); ?> I get no errors and when I hit submit it flashes the screen so I believe it's working but I just cannot figure out how to get it to process what is in this form, I have been looking through the docs and its just not sinking in. Can anyone help please? Thanks, Doomie RE: Trying to understand forms - skunkbad - 03-02-2016 The next step would be to use the Form Validation library to process the posted values. You then have the values available with set_value(), and you can do whatever you want with them. RE: Trying to understand forms - doomie22 - 03-03-2016 Ok I have managed to get to this stage but I am stuck at only being able to update 1 item (there is 2). I have this in my controller: PHP Code: public function process(){ and in the model I have : PHP Code: function form_insert($data){ Now I know that this just updates it and then puts the 2nd one into the first value as I am hard coding id=1, I just cannot figure out how I can tell it to put it into the different id's. RE: Trying to understand forms - InsiteFX - 03-03-2016 You cannot have 2 keys with the same name in your array, the last key will over write the first key. |