![]() |
Posting a form to DB when form contains ’form_textarea’ - 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: Posting a form to DB when form contains ’form_textarea’ (/showthread.php?tid=55568) |
Posting a form to DB when form contains ’form_textarea’ - El Forum - 11-01-2012 [eluser]Energetic Pixels[/eluser] Ok, I have the following form: Code: <?php echo form_open('Glossary/createTerm'); Code: function createTerm() { But when I run it, I get a undefined property pointing to the 'textarea' within the createTerm function. When I change that specific line to be '$this->input->post..' it works. By using the 'input' method, is the correct way?? respectfully, Anthony Posting a form to DB when form contains ’form_textarea’ - El Forum - 11-01-2012 [eluser]jmadsen[/eluser] hi E-P, This area is for "General CodeIgniter Discussion (no code)" Please post in the Code area for a response. thank you Posting a form to DB when form contains ’form_textarea’ - El Forum - 11-01-2012 [eluser]Robin Sowell[/eluser] ![]() And yes, unless you've got something going on we can't see, $this->textarea isn't defined. What [url="http://ellislab.com/codeigniter/user-guide/libraries/input.html"]$this->input->post('x')[/url] will do is simply return $_POST['x'] or FALSE if undefined. More or less. Since it looks like you named your textarea field 'definition', then $this->input->post('definition') should give you what you want (i.e., $_POST['definition'], only better). |