I cannot receive post data. |
[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.
[eluser]Sudz[/eluser]
use this in view Code: <form method="post" action="<?php echo site_url('/home/login'); ?>" id="login_form">
[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).
[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.
[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
[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.
[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
[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() |
Welcome Guest, Not a member yet? Register Sign In |