Codeigniter Angularjs http post not workingBy Hardik Savani | February 22, 2016 | | 2910 Viewer | Category : PHP jQuery AngularJS Codeigniter
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 Google OAuth authentication using Socialite Package
- How to get filename without extension in PHP?
- JQuery - Delete confirm modal using bootbox example
- How to get last inserted id in Codeigniter?
- Laravel 5.5 CRUD Example from scratch
- Multi select autocomplete jquery example with code
- Laravel 5 - Multiple Images Uploading using dropzone.js example with demo
- Codeigniter - Dynamic dependent dropdown using jquery ajax Example