How to get an int-value from an $http-request in PHP ?
I´m trying to send a http request from an Angular app but i´m not able to get the value of the sent `id`` parameter into my PHP variable $id.
I tried several methods like:
$id = $_POST['id'];
or
$id = $connection->real_escape_string(isset($_POST['id']) ? $_POST['id'] :'');
in my PHP but nothing works...
This is my function to send the $http request
function removeFriend( id ) {
var request = $http({
method: "delete",
url: "php/deleteFriend.php",data: $.param({'id':id}),
headers: {'Content-Type': 'application/x-www-form-urlencoded'}
});
return( request.then( handleSuccess, handleError ) );
}