I wrote this cookie script to work with every platform and every browser..
since I was having the same cookie problems you were having and a lot of
people have had in this forum. So far I have found it to work with
everything. Give it a try, if anybody finds that it does not work with a
platform/browser please tell me.
<?
function NextYear () {
$today = gmdate("l, d-M-");
$today .= gmdate("Y")+1;
$today .= gmdate(" H:i:s")." GMT";
return $today;
}
$oneYear = NextYear();
header("Set-Cookie: VarName=$VarNameValue; path=/; expires=$oneYear");
?>
Rick
> No formatting a developing station is a really stupid thing to do ;-)
>
> Have you looked into your C:/docs/you/cookies? It should be there.
> Hey, why instead don't you try to remove it? Set it to nothing - that's
> it.
>
> Logic: if at least a friend of yours sees it - means it works. Cookies
> could be a pain, a real pain when testing your apps.
>
> Maxim Maletsky
> www.PHPBeginner.com
>
>
>
> -----Original Message-----
> From: Chris Hayes [mailto:[EMAIL PROTECTED]]
> Sent: mercoledi 3 ottobre 2001 23.29
> To: [EMAIL PROTECTED]
> Subject: [PHP] cookie not set anymore by IE5 (localhost)
>
>
> hi,
> i'm having a cookie problem. Maybe you know Postnuke, anyway it
> requires cookies for users and the admin.
>
> At first it worked fine, i tried to add functionailty, testing
> it on postnuke. Then i deleted some cookies, even deleted the
> windows/cookies/index.dat , installed some extra versions of
> postnuke. All on localhost (PHP4 Apache WIN98 IE5 ZoneAlarm
> MySQL).
>
> Now i see to my amazement that netscape 6.1 works, so maybe
> this is not a php problem after all...
>
> Anyway so i cannot set a cookie anymore with IE with PHP
> setcookie.
>
>
> I even made a simple file:
> <?PHP
> $info = 'cook infor';
> setcookie("nogeen","$info",time() + 15552000);
> ?>
> But no cookie appears.
>
> External sites happily add cookies.
>
> Headers_sent confirms i did not send a header yet.
>
>
> What can i do???? (except format c:....)
>
> BTW it seems like Netscape also
>
>
> Chris H.
>
>
> ---------------------------------------------------------------
> -----
> -- C.Hayes Droevendaal 35 6708 PB Wageningen the
> Netherlands --
> ---------------------------------------------------------------
> -----
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED] To
> contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]