Codeigniter Angularjs http post not workingBy Hardik Savani | February 22, 2016 | | 2060 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();
- How to check column exists or not in table Laravel 5
- Bootstrap progress bar animate example using bootstrap-progressbar.js
- How to get php.ini file path?
- How to integrate google map using gmaps.js in php example?
- Bootstrap multiselect dropdown in popup using popupMultiSelect plugin
- How to use where clause with mysql function in Laravel 5?
- How to set bootstrap timepicker using datetimepicker library example code
- How to copy one table data into another table using Mysql Query?