note 11707 modified in function.setcookie by john

From: Date: Sat, 30 Nov 2002 16:16:52 +0000
Subject: note 11707 modified in function.setcookie by john
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-40156@lists.php.net to get a copy of this message
For IE 5.0+; funny thing is that the first statement worked for about 2 weeks then stopped for some unknown reason - no updates to IE, no updates to the php code, no nothing.... After 3 hours of sitting here messing around I found this comment and added the quotes around my expire statement and it seems to have worked (for now). setcookie ("TestCookie", $value,time()+3600); //doesn't work setcookie ("TestCookie", $value,"time()+3600"); //it works As a note, I've been weeding through the comments and trying just about all of them. I tried to set cookies through meta tags as that seemed to work for some. No luck for me - Netscape worked like a charm but IE was very stubborn. The quotes finally worked for both. Good luck! Take-home point - IE is extremely persnickety!!! --was-- I had the same problem as admin@digitart.com.mx for IE 5.0+; funny thing is that the first statement worked for about 2 weeks then stopped for some unknown reason - no updates to IE, no updates to the php code, no nothing.... After 3 hours of sitting here messing around I found this comment and added the quotes around my expire statement and it seems to have worked (for now). setcookie ("TestCookie", $value,time()+3600); //doesn't work setcookie ("TestCookie", $value,"time()+3600"); //it works As a note, I've been weeding through the comments and trying just about all of them. I tried to set cookies through meta tags as that seemed to work for some. No luck for me - Netscape worked like a charm but IE was very stubborn. The quotes finally worked for both. Good luck! Take-home point - IE is extremely persnickety!!! http://www.php.net/manual/en/function.setcookie.php

« previous php.notes (#40156) next »