SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2000
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  2. #2
    SitePoint Enthusiast
    Join Date
    Jul 2000
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  3. #3
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2000
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  5. #5
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •