On 6 Mar 2001 07:53:46 -0800, kevin1 <[EMAIL PROTECTED]> wrote:
>How can I tell reliably if someone has cookies turned off?

Set a cookie on your site (perhaps the homepage?) and use code like this:

        if (!empty($UserHasCookies)) {
                echo 'Whew - you do have cookies';
        }

The idea is to set your code to assume that cookie support is disabled unless
it finds a cookie saying otherwise. That way it'll fail safely if someone
either doesn't have a cookie or their browser discards the cookie halfway
through. This may seem silly, but some people get *really* paranoid about
cookies. Combined with the increasingly good cookie management in modern
browsers and just about anything is possible - this is in fact the major
shortcoming to code like the above - it's possible for someone to accept one
cookie and deny another, so just being able to set a cookie once does not mean
that you will be able to set another.

Chris

-- 
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]

Reply via email to