Can someone give me a quick example for outputing all variables from the POST method?
Like:
variable1: value for variable 1
variable2: value for variable 2
This would be a HUGE help...thank you guys.
Luke
| SitePoint Sponsor |
Can someone give me a quick example for outputing all variables from the POST method?
Like:
variable1: value for variable 1
variable2: value for variable 2
This would be a HUGE help...thank you guys.
Luke
Oh, if it helps, this is going to be a script for accepting variables from authorize.net. After my form sends them a credit card number and such, they send back a comma delimited string containing the codes for the transaction (accepted, declined, etc etc)
Thanks...and I owe you cookies if you can help out.
Luke





while(list($key, $val) = each ($HTTP_POST_VARS)) {
print $key.": ".$val."<br>";
}
Please don't PM me with questions.
Use the forums, that is what they are here for.
I love you, man.
while(list($key, $val) = each ($HTTP_POST_VARS))
thats all it takes to split up by a comma? so, if it were delimited by a tilde I could use
while(list($key ~ $val) = each ($HTTP_POST_VARS))
?? Or am I reading that wrong?
Thanks a lot,
Luke





Oh sorry I thought you meant the result of an HTTP POST
To do it by a comma
$data = explode(",", $stringfromauthorize);
while(list($key, $val) = each ($data)) {
print $key.": ".$val."<br>";
}
Please don't PM me with questions.
Use the forums, that is what they are here for.
Bookmarks