I cannot receive post 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: I cannot receive post data. (/showthread.php?tid=43033) |
I cannot receive post data. - El Forum - 06-27-2011 [eluser]kjanko[/eluser] Controller: Code: public function login() View: http://pastebin.com/d1xXswhN Login function: Code: public function Login($username, $password) $_POST is empty array. I cannot receive post data. - El Forum - 06-28-2011 [eluser]Sudz[/eluser] use this in view Code: <form method="post" action="<?php echo site_url('/home/login'); ?>" id="login_form"> I cannot receive post data. - El Forum - 06-28-2011 [eluser]kjanko[/eluser] Didn't change anything, $_POST is still empty. I cannot receive post data. - El Forum - 06-28-2011 [eluser]kjanko[/eluser] I'd like to note that the site is hosted on my PC(http://localhost) and data is submitted just fine using the GET method. So this might be a bug in CI? (Almost the same version works on external host). I cannot receive post data. - El Forum - 06-28-2011 [eluser]InsiteFX[/eluser] And were is your login form? InsiteFX I cannot receive post data. - El Forum - 06-29-2011 [eluser]kjanko[/eluser] http://pastebin.com/d1xXswhN It's a widget on the homepage. I tried making a simple form and test again, however it didn't work out. I suspect It's a bug with CI. I can only access $_GET and cookie data on localhost, however I can't access $_POST nor I can access $_GET/$_POST via $_REQUEST. I cannot receive post data. - El Forum - 06-29-2011 [eluser]InsiteFX[/eluser] And why do you think its a bug with CI when everyone else can receive post data? I think you will find that your problem is in your view code. var_dump($value); print_r etc. InsiteFX I cannot receive post data. - El Forum - 06-29-2011 [eluser]kjanko[/eluser] Because on my web host(http://delisium.com) the same method works just fine. On localhost It doesn't. Another user has been experiencing the same problems and he posted on this forum. I don't see anything wrong with my view file. I cannot receive post data. - El Forum - 06-29-2011 [eluser]InsiteFX[/eluser] Then what operating system and apache server software are you running? I run Windows 7 Pro 64-bit with XAMPP 1.7.4 and have never had a problem with post data. InsiteFX I cannot receive post data. - El Forum - 06-29-2011 [eluser]Unknown[/eluser] I have noticed that when I don't validate an input feild, it gets vanished. kjanko try this code in place of your login function: Code: public function login() |