You are here: Re: [PHP] setcookie() is not my friend « PHP « IT news, forums, messages
Re: [PHP] setcookie() is not my friend

Posted by tg-php on 10/06/05 18:33

Good catch, Chris. I was wondering about that myself but hadn't taken the time to see if setcookie() used regular serial time or if cookies had another time standard.

echo date("m/d/Y h:i:s", 15552000);

06/29/1970 08:00:00

That's what I get.

-TG

= = = Original message = = =

Unless I'm mistaken, you appear to be setting the Expiration date of the
cookie to "Mon, 29 Jun 1970 17:00:00 -0700".

Which would cause the cookie to be unset, if it were already set, and do
nothing otherwise.

Chris

Brian Dunning wrote:

> I'm trying to setcookie('username',$username,15552000) but on
> subsequent pages $_COOKIE('username') is always null.
>
> I verified that I'm setting it before any other output is sent to the
> browser. I verified that $username does have some valid contents. I
> also verified that the browsers I'm testing are set to allow all
> cookies. I do have a $username and a $_SESSION['username'] that
> contain the same data.
>
> I'm all out of ideas for where to look further to debug this - any
> suggestions?
>


___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация