This is driving me nuts because I’m being sent a form post that includes a name-value pair that looks like this:
&transaction[0].id=5TH49195SG993903B
In my php receiver file I’m trying to get the value thusly:
$txnid = $_POST["transaction[0].id"];
Yet it comes in blank every time. This is from a paypal IPN transmission. I’m not tagging this question for paypal because I don’t think it’s related to paypal. I can log into paypal and see what they say is the form post, so evidently they are sending that (along with lots of other values).
Am I making some kind of stupid mistake? I’m thinking this has something to do with the [0] indexer because I can successfully get other form values in this same POST, when they don’t have an indexer on them. Such as:
$buyer_email = $_POST["sender_email"];
What am I doing wrong?
if you try
var_dump($_POST)you will get output like this:Therefore in order to catch that param you need to use
$_POST['transaction'][0];