Displaying dynamic form data - 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: Displaying dynamic form data (/showthread.php?tid=1958) |
Displaying dynamic form data - El Forum - 07-07-2007 [eluser]Chris Williams[/eluser] After going through the tutorials, I wanted to make a form that was table driven. So the input names come from values of a record set. Without knowing those names, how do I display $_POST data? Is there helper in CodeIgniter for this? Displaying dynamic form data - El Forum - 07-07-2007 [eluser]ztinger[/eluser] Can you elaborate?? I'm not sure if i got right the first part of your post. To display $_POST data you do this in the controller: Code: $data['name']= $this->input->post('name'); then in your view file: Code: Your name is :<?=$name?> Was that your question? Displaying dynamic form data - El Forum - 07-08-2007 [eluser]Chris Williams[/eluser] Right. I wasn't sure if there was a helper built in for this or not. Basically, my database populates the form which changes week to week. So I can't hard code any of it. I am using this for dynamically made forms. It works, I didn't know if there was a smarter way around this. Code: foreach ($_POST as $i => $someVar) |