in reply to Re: shield from content statement
in thread Problems setting a cookie

I have html text in the script, so if i remove the line, i get a server error. -Lisa

Replies are listed 'Best First'.
Re^3: shield from content statement
by fruiture (Curate) on Nov 17, 2002 at 11:56 UTC

    The HTTP-Header must be the _very first_ thing your script sends to STDOUT:

    #somewhere in the beginning of your program # nothing has been sent to STDOUT yet print $cgi->header( -cookie => $your_cookie, -type => 'text/html' );
    --
    http://fruiture.de
      Yes.. for some strange reason the cookie makes the script act abnormal if i put the cookie before the http header. I was thinking of using a javascript cookie instead.. -Lisa.