Re: [PHP4BETA] Cookies again...
| From: | Andrew Libby | Date: | Mon, 28 Feb 2000 18:45:52 +0000 |
| Subject: | Re: [PHP4BETA] Cookies again... | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-11150@lists.php.net to get a copy of this message | ||
consider the following code:
<?php
if(isset($TRIED)) {
if(isset($TEST_COOKIE))
echo "<html>Cookie enabled!</html>";
else
echo "<html>Bad, no cookie support</html>";
} else {
setcookie("TEST_COOKIE","Yep!",time() + 5);
Header("location: ./test_cookie.php?TRIED=1");
}
?>
I'm no PHP expert, but I've had some luck with this code.
Andy
On Mon, Feb 28, 2000 at 08:50:13AM -0800, Brett Delia wrote:
> Hey there,
>
> I have done some reading but to no real avail. I am having trouble
> trying to figure out a reliable way of testing to see if a person has
> cookies enabled on their browser when they come to our site. I have
> tried testing against global variables like $HTTP_COOKIE and
> $HTTP_COOKIE_VARS[PHPSESSID] and I can't seem to get reliable results.
> If anyone out there has any code samples to check out that helps with
> this problem I would greatly appreciate it.
>
> Thanks in advance,
> --
> Brett M. Delia
> Web Developer/Software Engineer
> Active Arts, Inc./SportsMVP.com
> 6650 S.W. Redwood Lane, Suite 200
> Portland OR 97224
> 503.684.5806 x775
> mailto: brett_delia@activearts.com
> http://www.activearts.com -
> http://www.sportsmvp.com
>
> Do what you can, with what you have, where you are.
> --Theodore Roosevelt
>
> I have simply tried to do what seemed best each day, as each day came.
> -- Abraham Lincoln
>
> --
> PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> For additional commands, e-mail: php4beta-help@lists.php.net
> To contact the list administrators, e-mail: php4beta-admin@lists.php.net
>
--
--------------------------------------------------
Andrew Libby
Consultant
Perfect Order, Inc
alibby@perfectorder.com