how to access the data i posted through ajax on my controller |
Code: $.ajax({ and this is my controller Code: public function identifying_usertype()
Maybe $this->input->post('name');
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(08-16-2017, 09:15 AM)InsiteFX Wrote: Maybe $this->input->post('name'); A little background on this question ... it comes from a stack overflow question that I was trying to help Lestah with. If he posts to the Welcome controller, then $this->input->post('name') works, but if he posts to any other controller then $this->input->post('name') returns NULL. It's very bizarre. Have you heard of such a thing?
Nope, the only thing I can think of is maybe he needs to clean his web browsers cache out.
If he specify's the correct controller then it should post to it. Ahhh, look at his ajax url, he is only using single qoutes Code: // should be like this. Not sure if that's the problem but it should be like I showed. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(08-16-2017, 11:31 AM)InsiteFX Wrote: Nope, the only thing I can think of is maybe he needs to clean his web browsers cache out. We spent a lot of time trying to figure this out yesterday. Didn't suggest cleaning the browser cache, but jumped through a lot of hoops: https://stackoverflow.com/questions/4570...9_45705168
Would you check your form if the email input with 'attribute' name='email' and password input name='password'?
Code: <form> then in the controller: Code: public function identifying_usertype() Try that code and see if you see the response. I m pretty sure you should! Good luck |
Welcome Guest, Not a member yet? Register Sign In |