How to get the Angular Posted Request in PHP

The POST method which angular uses send data using JSON format and in PHP Script we will not be able to receive POST data by simply writting $_POST directly.

I am assuming that you have read basic angularjs tutorial and know how to setup angular project.

Create a new angular controller and attach it to your project using

Now let’s create our basic form in HTML to add an organization name and description.

We have named our angular app as “organizationTreeApp” and controller as “organizationTreeCtrl”. Let’s create our org_controller.js file to initialize angular app. Create file name as org_controller.js and put this code in it.

Now we have to read POST data in PHP sent from Angular.

Leave a Reply

Your email address will not be published. Required fields are marked *