Php does not receive the data I pass with $http.post from the angular

Asked

Viewed 97 times

1

Hello, everyone. I’m trying to get some data passed by $http.post for a php script. This is my angled ajax:

    $http.post('../_classes/chamaOddss.php', id).then(function(datae) {
        console.log(datae);
    });

This is my php script that I use to receive this data:

$jogoId = file_get_contents("php://input");
echo $jogoId;

the

console.log(date)

shows that:

Object {date: "null", status: 200, config: Object, statusText: "OK"}

Can you help me? Thank you!

  • Isn’t that it? $http.post('.. /_classes/chamaOddss.php', id). then(Function(datae) { console.log(datae); });

  • My confusion, I meant to show the payload being sent.

  • I’m sorry, I don’t think I understand what you’re asking. If you want to know the information I’m sending is just an id, three to seven digits, example: 689574.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.