Codeigniter Angularjs http post not workingBy Hardik Savani | February 22, 2016 | | 1619 Viewer | Category : PHP jQuery AngularJS Codeigniter
Share this post:
Sometimes, you face problem you can't get post data using $this->input->post(), when you fire $http.post() using AngularJS or Jquery. I also face this issue, i can't receive post value when i fire $http.post in AngularJS, But i found how to receive post data or json data in Codeigniter controller. in following example through you can solve your problem:
public function store()
$_POST = json_decode(file_get_contents('php://input'), true);
$posts = $this->input->post();
- Laravel 5 generate sitemap using roumen/sitemap package Example
- PHP Script - Login with Facebook using facebook-php-sdk and MySQL example with demo
- Angularjs Simple Datepicker directive example code with Demo
- How to generate random unique string in Laravel 5?
- How to send mail using Sendgrid in laravel 5?
- How to create scroll to top of the page by jquery animate ?
- How to create authentication(login and registration) in Laravel 5.2?
- How to use DB transactions in laravel 5?