--- John <[EMAIL PROTECTED]> wrote:
> Sorry, I posted this with the wrong subject and don't want it go 
> get lost.
> 
> If I use CGI, then reference $cgi->param( "some_variable" ), and 
> some_variable is passed both as a hidden form field and as a URL 
> parameter, will one reliably override the other?

Depends.  Generally, CGI.pm doesn't let you mix GET and POST data, so if your form has 
POST data,
you'll have a bit of work to do -- hint:  open up CGI.pm and look for the word 'cake' 
:)

If the form uses the GET method, you can retrieve all values for a given form 
parameters by
calling param() in a list context:

    my @values = $cgi->param( 'some_param' );

If you have multiple values, that populates the array.  However, if you have multiple 
values and
call param() in scalar context:

    my $value = $cgi->param( 'some_param' );

then you'll find that param() returns only the first value that it processed.  If 
you're using
GET, that should be the first value that it finds in the URL.

Cheers,
Curtis "Ovid" Poe

=====
"Ovid" on http://www.perlmonks.org/
Someone asked me how to count to 10 in Perl:
push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//;
shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A

__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to