Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

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. 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?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2022-05-25 19:28 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (90 votes). Check out past polls.