Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

GET url

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

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

Hi
machine/cgi-bin/abc.cgi?x=5&y=6
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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-16 12:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found