$this->input->post not working? |
[eluser]bill19[/eluser]
Hi there, I've got the following form : Code: <form action="http://localhost/ionauth1/index.php/auth/login" method="post" accept-charset="utf-8"> and the following is my controller: Code: function login() { I am trying to use the ion auth library. After the initial form submission, i try to var_dump($identity) , but I am not getting any output. Am i doing something wrong? Thanks, in advance, Bill
[eluser]CroNiX[/eluser]
Because you tell it to redirect so you won't see it. Try putting a die() after your var_dump() so it won't continue and redirect.
[eluser]bill19[/eluser]
I've changed it to: Code: if($_POST) { //clean public facing app input still no output.
[eluser]InsiteFX[/eluser]
How do you expect to get input from your label names? identity and password should be assigned to your input name= fields! Code: <form action="http://localhost/ionauth1/index.php/auth/login" method="post" accept-charset="utf-8">
[eluser]bill19[/eluser]
Thanks for taking a look at this. I've changed the controller like so: Code: else{ This results in the form looking like: Code: <form action="http://localhost/ionauth1/index.php/auth/login" method="post" accept-charset="utf-8"> Once again, no output is generated. Its got to be something to do with the controller routing: I notice the first time through in my test environment it says http://localhost/ionauth1/ the full path for this is http://localhost/ionauth1/index.php/auth2/login which I have set in the /config/routes folder ( I have confirmed this ). After submitting though it goes to http://localhost/ionauth1/index.php/auth/login, which is a different controller..
[eluser]bill19[/eluser]
Hi again guys, I think I figured it out. In my controller folder I had a controller called 'auth', and a second controller called 'auth2' ( I was writing my code in 'auth2' ). I am not sure why, but after submitting the form control went directly to 'auth' (alphabetically before auth2 in controller folder?), not auth2 as I expected. I got rid of the original auth and renamed 'auth2' to 'auth' and now it works. Does this make any sense? Bill |
Welcome Guest, Not a member yet? Register Sign In |