Page 1 of 1

check if user has cookie on

Posted: Wed Feb 15, 2006 11:00 pm
by nincha
any ways to check if user allows cookie?

Posted: Wed Feb 15, 2006 11:04 pm
by josh
It requires two pages, set the cookie on page A, redirect to page B, page B will check if the cookie is there

Posted: Wed Feb 15, 2006 11:33 pm
by feyd
avoid header() redirection for that to work.

Posted: Thu Feb 16, 2006 2:22 am
by Chris Corbyn
You can do it client side with JavaScript too... though that's not as useful.

I'd guess it would simply be:

Code: Select all

if (document.cookie) //whatever