I am Having following lines of code in my project.
var app = angular.module('myApp', []);
app.controller('myctrl', function ($scope, $http) {
$http.post('temp2.php', { msg:'hello' })
.then(function (response) {
alert(response.data);
}, function (response) {
alert("error");
});
});
I am accessing msg
using $_POST
on temp2.php
page. But it is showing the following error undefined index msg
. Please help me.