AngularJS HTTP post to PHP and undefined output

Angularjs .post() defaults the Content-type header to application/json. This will overide form-encoded data, however it will not change data value to pass an appropriate query string, so PHP is not populating $_POST as you expect. Solution is use the default angularjs setting of application/json as header, read the raw input in PHP, and then deserialize the JSON. That can be achieved in … Continue reading