Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: CGI scoping question

by tangent (Vicar)
on May 10, 2019 at 18:33 UTC ( #1233574=note: print w/replies, xml ) Need Help??


in reply to Re^2: CGI scoping question
in thread CGI scoping question

Several parameters are being set through classical forms
...
This orderby and desc fields are not
If you are sending a form to your script then the parameters in the URL are not available to CGI's param(). You need to use url_param()
my $index = $q->url_param('orderby');

Replies are listed 'Best First'.
Re^4: CGI scoping question
by WoodyWeaver (Monk) on May 10, 2019 at 18:57 UTC
    (Bows head) Fascinating, and an issue I would not have guessed. http://127.0.0.1/id/bin/example.pl?exec=list&table=users&orderby=10 has lines
    my $index_url = $q->url_param('orderby'); my $index = $q->param('orderby'); my $desc_url = $q->url_param('desc'); my $desc = $q->param('desc');
    and produces <!-- variables (index, desc, index_url, desc_url) are (1, , 10, ) -->. The namespace collision did me in.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2022-01-18 20:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (54 votes). Check out past polls.

    Notices?