Re: Checking if cookies can be set.

From: Date: Sat, 26 Aug 2000 00:47:51 +0000
Subject: Re: Checking if cookies can be set.
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-13762@lists.php.net to get a copy of this message
James Atkinson wrote: > > Thats pretty much what I figured, but I was hoping I could save myself a > setcookie(), guess not :) What I've done is check to see if the cookie is set, and if not, issue the SetCookie; then do a Header("Location:") to the same URL. This doesn't work. Replace Header("Location:") to a page that have a <meta http-equiv:refresh> tag and a little message saying that cookies much be enabled, and it works. However, for a second or two (however long you set the refresh) the user looks at a page saying that cookies much be turned on. This is ok for my needs, but may not be for you. Then, if the cookie isn't accepted, it just sits and loops, which isn't nice either. :( Chris

« previous php.general (#13762) next »