[thelist] any/all post data

Bob Meetin bobm at dottedi.biz
Sun Apr 19 12:29:38 CDT 2009


Jack Timmons wrote:
> Forgive top post, on Phone.
>
> foreach($_POST as $k=>$v)
>      $post_data[$k] = $v
>
> Is that what you're looking for?
>
> -----
> Jack Timmons
> www.trotlc.com
> Twitter: @jorachim
>
> On Apr 19, 2009, at 11:20, Bob Meetin <bobm at dottedi.biz> wrote:
>
>> Is there any reasonable way to capture any post data sent to any form on
>> a web site without having to redevelop all pages.  Adding an include
>> would be fine. I'm thinking about setting up some sort of include script
>> that will pre-process all data input posted to forms?
>>
>> -- 
>> Bob
Jack, et,

probably something like this.  i'm not sure though.  arrays and post 
data are not my strength. would i then be able run a filter (check for 
certain content) and if it contains that content, prevent it from 
submitting or other?

say something like:

foreach($_POST as $k=>$v)
{
    $post_data[$k] = $v
    $post1 = $post_data[0];
    $post2 = $post_data[1];
    if ( $post1 == "good morning jim" ) { echo "wrong timezone you 
bum!<br />"; }
    if ( $post2 == "ciao" ) { echo "good bye!<br />"; }
    // etc.....
}




More information about the thelist mailing list