Re: Cookies!!!!

From: Date: Tue, 18 Jul 2000 22:03:46 +0000
Subject: Re: Cookies!!!!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-7158@lists.php.net to get a copy of this message
Bosco Martins wrote: > > Hi there. > I´m new at this list, and also new in php programming. I´m having a big > problem, that I couldn´t solve anyway. Maybe some of you can help me. > > The problem is that, when I set a cookie, I can´t retrieve it later. > The cookie is created like follows (and I can see it in the directory): > > $cookie=$variable > setcookie(cookie,$cript,time()+600,"/","",1); > > In the next page, I want to retrieve it, and I tried: > > $cookie=$HTTP_COOKIE_VARS["cookie"]; // Didn´t work. > ________ > > echo "$cookie"; // Didn´t work as well. > ___________ > > echo "$HTTP_COOKIE_VARS["cookie"]"; // And nothing. > > Please, anyone who have experienced that, help me. > > Thanks, > > Fabrizio Perciany Hi Fabrizio, Try it again without any quotes. $cookie=$HTTP_COOKIE_VARS[cookie]; Good luck, mike w.

« previous php.general (#7158) next »