[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Receiving user input


On Thursday 31 August 2006 17:17, Daniel B. Hemmerich wrote:
> Anyone have a code snippet of a routine that will parse both POST and
> GET user input and place it into a hash?

Using libapreq, how about something like 

  my %FORM = ();
 
  my $req = Apache2::Request->new($r);

  foreach my $name ($req->param) {
    next if ($FORM{$name});
    my @values = $req->param($name);
    $FORM{$name} = suppressed;
  }

Completely untested, taken from thin air, but you might like to give it 
a try.

-- 
Kjetil Kjernsmo
Information Systems Developer
Opera Software ASA


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.