CodeIgniter Forums
Checking for postdata - 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: Checking for postdata (/showthread.php?tid=51916)



Checking for postdata - El Forum - 05-23-2012

[eluser]giovannidc[/eluser]
Hey all,

I was trying to check for postdata using the codeigniter library. Normally I would just use isset($_POST['test']) but thought I'd give it a codeigniter try by using:
isset($this->input->post('test')

But that just gives me a server error. Any ideas on how to do it the codeigniter way?


Checking for postdata - El Forum - 05-23-2012

[eluser]giovannidc[/eluser]
Never mind, I see
Code:
if ($this->input->post('test'))
does the trick. Didn't work for me the first time because i left out the name attribute.