You are here: Re: cookie « PHP Programming Language « IT news, forums, messages
Re: cookie

Posted by C. (http://symcbean.blogspot.com/) on 12/31/07 10:22

On 31 Dec, 09:51, "~yby~" <manuele.gazza...@gmail.com> wrote:
> Hello everybody, I've got some troubles with a cookie and maybe
> someone can help me...
> this is the code I wrote
>
> $tempo=30*24*60*60*1000;
> setcookie ("css_user",$css_user,$tempo);
> setcookie ("css_user_id",$css_user_id,$tempo);
>
> in order to set a cookie with the two variables css_user and
> css_user_id; when I control the cookie values (using
> print_r($_COOKIE);) everything is ok. the problem is that this cookie
> is considered just like a "session" and when I close the browser it's
> deleted!
>
> Where am I mistaking?!
>
> thank you very much in advance! :)

Your cookie is set to expire on the 2nd of Jan 1970. Try adding time()
to $tempo

C.

 

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

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