in reply to Re: Using CGI.pm
in thread Using CGI.pm

BUU wrote:
"For example to get your form data you just do:"

my $c = new CGI::Lite; my %post = $c->parse_form_data('POST');

Will that work for a post request that contains a query string? Like this:

<form method="post" action="script.cgi?choice=one">

Replies are listed 'Best First'.
Re: Re: Re: Using CGI.pm
by BUU (Prior) on Nov 19, 2003 at 06:08 UTC
    Well, to be pedantic, no the above code wouldn't, as it only specifies the POST data. If you wanted the query string you would just call it with 'GET' as an arguement: my %get = $c->parse_form_data('GET');. If you wanted both types of paramaters in one hash then you would need to merge them some how. How you merge depends on how you want to treat duplicates and such.

      Cool. That gives me enough to work with and figure it out. Thanks for the help.