in reply to Cookie problem

This line is a big problem:
print qq~Content-type: text/html\n\n~;
You have already printed the header before the rest of your script runs, so any cookie is going to go into the body of the response, where it will do no good.

Replies are listed 'Best First'.
Re: Re: Cookie problem
by webstudioro (Acolyte) on Aug 14, 2003 at 16:27 UTC
    ok. I delete the problem line (thank you)
    and work very good , but the cookie it's not
    work (customize), why?

      Variables don't interpolate in single quotes:

      if (exists $cookie{'$user'}) {

      This code quotes a lot of variables unnecessarily; but this is definitely a bug. Also, you're recreating the $query object; I'm not sure if that'll wipe out any cookies, but it's definitely unnecessary.

        I try. Thank you.