I was defined in the subdirectory, but not the root directory.

So, I don't think it was an expiration problem.

Michele
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Scott Mattocks
Sent: Thursday, March 19, 2009 9:06 AM
To: NYPHP Talk
Subject: Re: [nyphp-talk] Cookie

Michele Waldman wrote:
>>From http://domain/accout/login.php, if did setcookie('logged_in", "1",
> $path="/");, like the documentation said too.
> 
> Does anyone know what I'm doing wrong here?

You mean other than relying on that cookie to tell you if the user is 
logged in? Yeah, you are missing the expire parameter and assigning a 
variable where you should just be setting the value (I know it will 
work, but it isn't a good idea).

Try: setcookie('logged_in', 1, 0, '/');

-- 
Scott Mattocks
Author: Pro PHP-GTK
http://www.crisscott.com
_______________________________________________
New York PHP User Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/show_participation.php

_______________________________________________
New York PHP User Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/show_participation.php

Reply via email to