Codeigniter Angularjs http post not workingBy Hardik Savani | February 22, 2016 | | 3995 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.5 - Validation Data Return - New Feature
- PHP - How to convert HTML file to PDF using Dompdf library?
- Laravel 5.5 group by doesn't work - fixed
- Laravel 5 - inner join with multiple conditions example using Query Builder
- How to add jquery modal popup in PHP?
- How to change date format in jquery using moment JS ?
- How to store all record in laravel5 Cache