Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: Cannot clear cgi param (if it's really what I need to do)

by lepetitalbert (Monsignor)
on Jan 31, 2008 at 09:33 UTC ( #665310=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Cannot clear cgi param (if it's really what I need to do)
in thread Cannot clear cgi param (if it's really what I need to do)

Hi kyle,

As I print other hidden params

print hidden( 'day' , $day );

I printed this one

print hidden( 'mode' , 'save' , 1 );

and this don't work.

print hidden( -name => 'mode' , -default => 'save' , -override => 1);

works, but I don't understand why ?

Have a nice day.

"There is only one good, namely knowledge, and only one evil, namely ignorance." Socrates


Comment on Re^4: Cannot clear cgi param (if it's really what I need to do)
Select or Download Code
Replies are listed 'Best First'.
Re^5: Cannot clear cgi param (if it's really what I need to do)
by ikegami (Pope) on Jan 31, 2008 at 10:16 UTC
    When you don't use the named parameter style, the first argument is the field name and the rest are values for the field.
    print hidden( 'mode' , 'save' , 1 );
    is short for
    print hidden( -name => 'mode' , -default => [ 'save', 1 ]);

      Hi ikegami,

      Thank you for the explanation.

      Have a nice day.

      "There is only one good, namely knowledge, and only one evil, namely ignorance." Socrates

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2015-07-29 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls