Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Cookie time again *eats cookie*

by !1 (Hermit)
on Dec 27, 2003 at 19:51 UTC ( #317215=note: print w/replies, xml ) Need Help??


in reply to Cookie time again *eats cookie*

Ok. I'm assuming you already know that the only value that this script will allow on the cookie is test. Since you are using CGI.pm's textfield method, it gets the values that were submitted. If you prefer to use your default value, you must use -override or -force. In other words, change your textfield call to:

textfield(-name=>"flavor",-default=>$tasty,-override=>1)

As for this pass bit, you need to edit your copy of CGI.pm. In CGI 3.01, on line 556 there's a comment about cake and eating it too. This will instruct you to uncomment line 559. Once you do that, param() can read parameters submitted from both the query string and STDIN. Oh yeah, you also submit the parameter as who, not pass. The value should be pass. I hope this helps.

UPDATE: Realized you used url_param instead of param thus negating the need to edit CGI.pm. However remember the order of verification: check the cookie, failing that check params, failing that display the default page.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2021-09-17 05:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?