cookie
am 31.12.2007 10:51:21 von manuele.gazzardi
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! :)
Re: cookie
am 31.12.2007 11:22:59 von colin.mckinnon
On 31 Dec, 09:51, "~yby~" 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.
Re: cookie
am 31.12.2007 14:26:51 von Jerry Stuckle
~yby~ 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! :)
>
All you can do is recommend cookie expiration. In the end, the browser
determines when the cookie will be deleted, and there is nothing you can
do about it.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: cookie
am 02.01.2008 10:29:55 von manuele.gazzardi
On 31 Dic 2007, 11:22, "C. (http://symcbean.blogspot.com/)"
wrote:
> On 31 Dec, 09:51, "~yby~" wrote:
>
>
>
>
>
> > Hello everybody, I've got some troubles with acookieand maybe
> > someone can help me...
> > this is the code I wrote
>
> > =A0 =A0 =A0 =A0 $tempo=3D30*24*60*60*1000;
> > =A0 =A0 =A0 =A0 setcookie ("css_user",$css_user,$tempo);
> > =A0 =A0 =A0 =A0 setcookie ("css_user_id",$css_user_id,$tempo);
>
> > in order to set acookiewith the two variables css_user and
> > css_user_id; when I control thecookievalues (using
> > print_r($_COOKIE);) everything is ok. the problem is that thiscookie
> > 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! :)
>
> Yourcookieis set to expire on the 2nd of Jan 1970. Try adding time()
> to $tempo
>
> C.- Nascondi testo tra virgolette -
>
> - Mostra testo tra virgolette -
!!!thank you very much!!!!