-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This is probably a question better addressed to the AzPHP mailing list instead of PLUG discuss. You can find it at http://www.azphp.org/ Craig White wrote: | Trying to figure out what is exactly POST'ed to a php file when executed | from a form. Perhaps my problem is that from the 'sender' I have several | 'form' objects, each with an 'input' button to invoke the action. I do this internally on our systems all the time and don't generally have issues. The only fields that are posted to a page are the ones that are inside of the
~ If a user clicks on Button 2, then only the text field "bar" is posted to bar.php -- "foo" is ignored. | anyway, I have tried to inspect the contents of of the POST by simple | commands in my target.php file with | | var_export($_POST); | var_export($_HTTP_POST_VARS); $HTTP_POST_VARS is deprecated as of PHP4 -- avoid it like the plague, if you can. | but the thing that is really making me crazy is if I have two | consecutive lines... | | $action = $_POST['OK']; | var_export($_POST['OK']); | | will return different values. | | It's almost as if the value of $_POST['OK'] will never die - even if I | change the 'name' of all of the ' | buttons. It's really hard to tell what you're trying to do without seeing both PHP code and accompanying HTML, so I can't comment on this one. | So I am really left to think that the above 'var_export' commands simply | don't give me a complete dump of all of the data that is POST'ed - is | there any way to get a complete dump of this data? You can try several other methods. Try these: ~ 1. echo "". print_r($_POST) .""; ~ 2. echo "
". var_dump($_POST) .""; ~ 3. foreach ($_POST AS $key => $val) { echo "$key => $val