-----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
tag that has the button that was pressed. Using the example XHTML code: ~ ~ ~ ~
~
~ ~ ~
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
" } Note that if you're using PHP3 instead of PHP4, you'll need to replace $_POST with $HTTP_POST_VARS instead. HTH - -- June Tate * http://www.theonelab.com * june@theonelab.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCLeHMiLw1iDrV/zwRAqnkAJsElLQlMkLI/8S0hsvIVwmQOtp3ogCfeJHE K81slKMd/rHoriJtDs9eH/Y= =WApa -----END PGP SIGNATURE----- --------------------------------------------------- PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us To subscribe, unsubscribe, or to change you mail settings: http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss