http://qs321.pair.com?node_id=316833


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