Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: Re: Cookies

by edoc (Chaplain)
on Dec 24, 2003 at 12:22 UTC ( #316833=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Cookies
in thread Cookies, how can you set one if it must be done before the header?

IE requires the path be set in your cookie..

my $cookiename = cookie( -name => 'cookie', -value => 'loggedin', -expires => '+1h' -path => '/', );

cheers,

J

Replies are listed 'Best First'.
Re: Re: Re: Re: Cookies
by Anonymous Monk on Dec 24, 2003 at 22:57 UTC
    I added the path but it still doesn't change the fact that I can log in, but if I go back to the url 2 seconds afterwards it forces me to log in again.
      my $cookiename = cookie( -name => 'cookie', -value => 'loggedin', -expires => '+1h' ); print header, start_html();

      You haven't actually set the cookie just by doing that. You've created a cookie but then not sent it to the browser. You need to print the header and explicitly tell it to include the cookie.



      ($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss') =~y~b-v~a-z~s; print

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2022-01-16 10:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (49 votes). Check out past polls.

    Notices?