Re: Weirdness with setcookie() (3rd time - come on people :)

From: Date: Tue, 14 Nov 2000 02:46:25 +0000
Subject: Re: Weirdness with setcookie() (3rd time - come on people :)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-25102@lists.php.net to get a copy of this message
On Mon, 13 Nov 2000 18:34:32 -0800 (PST), Joao Prado Maia (jmaia@kefta.com) wrote: >On Mon, 13 Nov 2000, Mark Maggelet wrote: > >> well, when you include() it, the cookie wouldn't be set because the >> browser hasn't had a chance to send it yet. > >When you include another script, and this script has any HTML being >outputted (like whitespaces or normal tags), PHP sends the cookie >along >with it to the browser, so the cookie is set with include(). That >is, if >the file you are including outputs anything to the browser, and my >script >does :) I think you've got the wrong idea. It's the browser that sends the cookie to the server, not the other way around. (unless you're talking about setcookie() which I don't think you are.) The cookie wouldn't be set until the page reloads. >> one more thing to try is your GPC order, could a post value be >> sneaking in there? > >I thought of that for two seconds a while back, but again, there is >another section of this site that uses cookies, and I don't use >$HTTP_COOKIE_VARS in there, and it works. ok, but my thinking is that a post variable by the same name as the cookie could be sneaking "in front" of the cookie variable here, while it might not be in another section of your site. It's unlikely but I mentioned it because once I had a problem with netscape unexpectedly sending post variables along with a page after being redirected. - Mark

« previous php.general (#25102) next »