using angularjs to fetch data with $http
userId = '1';
$http({
url: "php/loadTab.php",
method: "POST",
data: userId
}).success(function(data, status, headers, config) {
console.log(data);
}).error(function(data, status, headers, config) {
});
Encountering issues - POST method not sending data to php. When trying to echo $_POST['userId'], it returns undefined index. Attempted using data:'userId':'1'
as well.