Re: Cookies in PHP

[email protected] ("MaulingMonkey") Tue, 6 May 2003 09:49:56 -0700
Newsgroups php.lang,php.qa
Organization Weird Studios
Message-ID <[email protected]>
"Adam Szewczyk" <[email protected]> wrote in message
news:[email protected]...
> 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 :-).