Re: $_COOKIE

From: Date: Fri, 05 Jul 2002 14:48:39 +0000
Subject: Re: $_COOKIE
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-105664@lists.php.net to get a copy of this message
Scott Fletcher wrote:
That is what I thought so! Thanks! To me, the $_COOKIE seem to get data from the browser in some way. Correct me if I'm wrong. Something like a communication between cookie. Thanks, FletchSOD
Привет! Yes, that's the way it works. Once you do a setcookie() on the server you actually issue a sort of "delayed command" for the client, if you pardon me the expression :) In short, when you print out your HTML you also tell the client to save some data in its disk (or RAM when you use session cookies). This data will be presented back later to you with the next URL request. It is NOT saved on the server, it is just a sort of automatic add-on that you will have on all links pointing to you until the cookie expires. It will be presented to those URLs you specify when building the cookie (usually you will want to limit their action to some subdirectory to avoid having back data out of context). Sounds very nice, but... But the trouble is that in doing so you issue a command to a machine of which you know almost nothing. Most of all, you don't know whether it's capable of executing your order. Or willing to, since users may disable cookies. Sort of blind date, but the girl may actually not show up later... 99% she will, but you should not count on it. Пока Альберто Киев
"Alberto Serra" <albertoserra@gala.net> wrote in message news:3D25A66A.8090904@gala.net...
Scott Fletcher wrote:
I have a question! Since the $_COOKIE is on the server side, not on the client side. So, will the use of hte $_COOKIE be affected when the
user's
browser disabled the cookie? I do not know how the $_COOKIE on the
server
side work or get the information from. Thanks, FletchSOD
Привет! Yes, that's the problem with cookies :( In case they get disabled, or just manually canceled) $_COOKIE will not contain anything at all. Which is why I don't like cookies. Альберто Киев -- @-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@ LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......
-- @-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@ LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

« previous php.general (#105664) next »