On 01/12/2010 19:01, Daniel P. Brown wrote:
On Wed, Dec 1, 2010 at 09:50, Bundhoo M Nadim<nadim@xxxxxxxxxxxxxxxx> wrote:
If I just put only this piece of code:
<?php
var_dump($_POST);
?>
i get nothing. But the above codes is successfully redirecting me to
page.php with a properly constructed query string -> which means that $_POST
was never empty. So why var_dump($_POST) is returning just array(0) { } ???
Are you actually posting data to it?
Actually this is the response page, i.e. a payment gateway is sending
the result of a transaction to this page. Normally I expect to catch the
data sent by the payment gateway using the $_POST array, i.e. $result =
$_POST['result'], etc.
So i wanted to check the data sent by the payment gateway using
var_dump($_POST); <--- this gives me array(0) { }
But if I put the other codes (lemme quote again here):
filename: response.php
<?php
header("Expires: " . gmdate("D, d M Y H:i:s", time() + (0*60)) . "GMT");
header("Pragma: no-cache");
print "REDIRECT=http://www.domaine.com/page.php?";
$param = http_build_query($_POST);
print $param;
exit(0);
?>
It successfully redirects me to page.php + the properly constructed query string
e.g.: http://www.domain.com/page.php?var1=val1&var2=val2 ... etc
That's baffling me. Why can't I catch the $_POST data in this response.php but I get them in page.php ??
Something weird.
nadim attari
alienworkers.com