Re: Cookies on Phoenix

From: Date: Sun, 18 May 2003 15:16:28 +0000
Subject: Re: Cookies on Phoenix
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-148085@lists.php.net to get a copy of this message
John W. Holmes wrote:
I tried to work with Cookies for a _little_ forum thingie. The problem
I
have is that it doesn't read it out correctly. It is saved and I can work with it first. But as I close the browser and open the site again it doesn't see the cookie. I had the same problem with Mozilla and Opera. IE was the only browser where it worked =|.
Show some code. Are you setting an expire time for the cookie? Are your settings in Mozilla deleting the cookie regardless of the expiration time (a setting under preferences can allow you to do that). ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ Thx For quick reply.
Here's an extract of the code. An expire time was set and the cookie still exists as I watch through the list of cookies set in Mozilla. <?php [...] $str = serialize($cook); setcookie($CName,$str, time()+(1000000000*100000000)); [...] ?> <?php [...] $cook = unserialize(stripslashes($_COOKIE[$CName])); [...] ?> $cook is definded as an array.
Do you have "Throw away new cookies on exit" set in Opera? "Limit maximum lifetime of cookies to current session" in Mozilla?
Call me supernoob .. but... where do I find this option in Mozilla? Thx For Help Niels

« previous php.general (#148085) next »