hello all,
this is some code that i am using that "loops" through all of the variables
that paypal
ships back to me via ipn.
for ($x=0; $x < count($postvars); $x++)
{ $y=$x+1;
$postkey = $postvars[$x];
$postval = $$postvars[$x];
$postipn.= "&" . $postkey . "=" . urlencode($postval);
$mailipn.= $postkey . " = " . $postval . "\r\n";
}
i then email myself a copy of $mailipn and it contains everything i need.
that part works fine.
however, is it possible to set a variable using the names that were
returned.
for example, paypal sends me back "business", so i would like to set the
value of $business
equal to the value from the paypal post.
normally i would do this:
@$business = $_POST['business'];
but since there are quite a few variables, and the names change (i.e.
shopping carts, etc.)
i would like to set them using the loop posted above (it returns them all).
using the loop above, the "business" line looks like this when echoed:
business = my********@paypal.com
so you see, it would nice to make a $business variable for later use in the
script
that contained my********@paypal.com
thanks.