Cookie Problem...

From: Date: Wed, 18 Oct 2000 08:12:46 +0000
Subject: Cookie Problem...
Groups: php.general 
Request: Send a blank email to php-general+get-20835@lists.php.net to get a copy of this message
Hello! I am faced with a rather unusual problem with respect to cookies. Here is the scenario: Iniitally I was using "setcookie()" function to set a cookie. setcookie ("bw_cookie", $txtVar, time()+300, "/", ".backwash.com"); This was working in IE5.0, NS4.x, and IE4SP1 (on NT). Somehow the same code was not working on IE4SP1 on Win9x (this was rather surprising). However, I verified that a cookie is being set from other sites. I enabled the cookie message prompt from the settings and visited yahoo and I could see that a cookie was being set. Also, I received a similar complaint from a collegue of mine who used IE5 and was still not able to get cookies set. After reading through the documentation available on http://www.php.net/maunal/function.setcookie.php I tried to call the HTTP header directly to set the cookie. $time = mktime()+300; $date = date("l, d-M-y H:i:s", ($time)); header("Set-Cookie: bw_cookie=$txtVar; expires=$date GMT"); After doing this I could NOT get it to work on any browsers. I do not know what mistake I am making, but any help would be really appreciated. Regards. === Viral Shah viral@noeticsolutions.com

« previous php.general (#20835) next »