Re: Cookies in PHP
| From: | MaulingMonkey | Date: | Tue, 06 May 2003 16:49:56 +0000 |
| Subject: | Re: Cookies in PHP | ||
| References: | 1 | Groups: | php.lang php.qa |
| Request: | Send a blank email to php-lang+get-488@lists.php.net to get a copy of this message | ||
"Adam Szewczyk" <adam@adv.pl> wrote in message
news:20010918182523.19697.qmail@pb1.pair.com...
> There is a posibility to check if user has enabled option "Allow cookies
> that are stored on your computer".But in IE5.x there is a second option:
> "Allow per-session cookies (not stored)".Is there any way to check this
> option?
>
> Thanks in advance.
>
> Adam
I'd just use a script to test it:
aka (mind you im no pro):
tester.php
<?php
setcookie("sessioncookie","is saved");
setcookie("generalcookie","is saved", time()+60);
?>
<html><head><title>Tester.PHP</title></head>
<body>
<a href="testcheck.php">Test</a>
</body></html>
testcheck.php
<html><head><title>Test Check</title></head>
<body>
<?php
if ($_COOKIE["sessioncookie"] == "is saved")
{
The session cookie got saved.
}
if ($_COOKIE["generalcookie"] == "is saved")
{
// we'd actually need to close/reopen the browser to see if this one
stays saved,
// but you said there was a way to check that, so I guess you don't
even need
// this one :)
}
?>
</body></html>
if you want it automatically done, just put in tester.php between the
</title> and </head> tags: <meta HTTP-EQUIV="refresh"
content="0,testcheck.php">
that's my two cents...now get it corrected by someone smarter than me :-).