Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

GET url

by tarunkhanna (Novice)
on Oct 12, 2011 at 06:21 UTC ( #930910=perlquestion: print w/replies, xml ) Need Help??

tarunkhanna has asked for the wisdom of the Perl Monks concerning the following question:

I am able to access values of x and y through
use CGI qw(:standard); use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use strict; my %form = (); print header; print title("Get Form"); print start_html(); print start_form(-method=>'GET',-action=>"abc.cgi?tarun=7&varun=8"); foreach my $p (param()) { print "$p<br>\n"; $form{$p} = param($p); print "$p = $form{$p}<br>\n"; } print submit; print end_form; print end_html;
But I want to modify this statement
print start_form(-method=>'GET',-action=>"abc.cgi?x=7&y=8");
in a way that it calls url with value of x = 7 and y = 8

If I replace word GET with POST, then also it doesn't give proper results on pressing submit button.

Replies are listed 'Best First'.
Re: GET url
by Anonymous Monk on Oct 12, 2011 at 06:28 UTC
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: GET url
by Anonymous Monk on Oct 13, 2011 at 08:48 UTC

    Shouldn't you be using hidden form fields? I don't know of any other method of passing query string parametres with a HTML form.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://930910]
Approved by davido
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2023-12-08 05:53 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (35 votes). Check out past polls.