My problem is very common. I must be doing some silly mistake somewhere but I am not able to figure it out.
I am send my form data in serialized form but it is not coming to PHP at all.
Angular JS code:
saveForm: function() {
var str = $('#feedbackForm').serializeArray();
alert(JSON.stringify(str)); // here I am getting my data properly
return $http({
method :'POST',
url:'http://localhost/api?module=form&app_id=APP001&action=save&formid=2&user_id=3',
data: str
});
}
PHP
$log->info($_REQUEST); // I am getting all GET parameters correctly
tried this also
$log->info($_POST);
it is not printing my data. why?