Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Passing multiple parameters to a CGI script?

by InfiniteSilence (Curate)
on Sep 14, 2005 at 21:21 UTC ( [id://492027]=note: print w/replies, xml ) Need Help??


in reply to Re: Passing multiple parameters to a CGI script?
in thread Passing multiple parameters to a CGI script?

You are not required to use ampersands to delimit variables if your script is using the CGI module. From the CGI perldoc:

-newstyle_urls Separate the name=value pairs in CGI parameter query strings w +ith semicolons rather than ampersands. For example: ?name=fred;age=24;favorite_color=3 Semicolon-delimited query strings are always accepted, but wil +l not be emitted by self_url() and query_string() unless the -newstyle_urls pragma is specified. This became the default in version 2.64.

Celebrate Intellectual Diversity

Replies are listed 'Best First'.
Re^3: Passing multiple parameters to a CGI script?
by Spidy (Chaplain) on Sep 14, 2005 at 21:35 UTC
    I'm using the standard functions of CGI (use CGI qw(:standard);), and attempting to use
    $queryvariable = new CGI; $variable=$queryvariable->param('param');
    to get the parameters. How would I link to the cgi file, and be able to use multiple parameters?
      Usually when you import the standard functions, it is because you are using the function oriented, not the object oriented style. With the latter, you don't need to import :standard. I'm unclear about what you mean by "use multiple parameters". You can get the values of any parameter names using param('name'), and you can get all the names returned as a list if you wish by using param().
      chas

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-26 00:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found