Here is my app.js, I want to send the value of email to the file handler.php
$scope.doForget={email:''};
$scope.doForget = function (customer) {
//email = $scope.forget.email; For Testing i am hardcoding the value
email = '[email protected]';
Data.post('handler.php', {
email: email
}).then(function (results) {
console.log(results);
});
};
In the Inspect Element -> Networks i can see the form values as {email: "[email protected]"}
In the handler.php i use to print the values by print_r($_POST); and even print_r($_GET); but i am always getting the empty array i.e.,
Array
(
)
How can i get the values ?
Update :
I even tried this one
$scope.doForget={email:''};
$scope.doForget = function (email) {
email = '[email protected]';
Data.post('eloquent.php', {
email: email
}).then(function (results) {
console.log(results);
});
};
post('eloquent.php', {emailNew : email}).then()ReferenceError: post is not definederror$httpservice ?Data.postnot implemented correctly by replacing it with$http.post?