Alex Dean wrote:
> Don Calfa wrote:
>
>> 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 am trying to evaluate the 'array' that is POST'ed to branch to
>>> different functions within a php script and I get varying results.
>>>
>>> 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);
>>>
>>> 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 '<input name="OK" value="some_value">
>>> buttons.
>>>
>>> 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?
>>>
>>> Craig
>>>
>>> ---------------------------------------------------
>>> 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
>>>
>>>
>> I use :
>>
>> print"<pre>";print_r($_POST);
>> ---------------------------------------------------
>>
>>
> I do almost the same as this...
> echo "<pre>";
> var_dump($_POST);
> echo "</pre>";
> die(); // good to have this if you're debugging a script which could
> 'do stuff' like update a database.
>
> var_dump() gives you a little more meta-information about a variable
> than print_r() does, but they're basically equivalent for the current
> purpose.
>
> alex
> ---------------------------------------------------
>
Just curious, why do you kill your script after the results?
---------------------------------------------------
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