no cookies

is there a way to detect if my surfers are using cookies or not?
so I can make a page for cookie users and one for no cookie!
so if the user goes into index.php to redirect them to
index_cookie.php or to index_nocookier.php
can someone help me make this?
Who is Participating?
BrianGEFF719Connect With a Mentor Commented:
Hi Sabrin,

index.php code:

setcookie("checkCookies", "cookieCheck"); //write a cookie
header('Location:'); //send to a page that will check if the cookie was written

cookieCheck.php code:

if (isset($_COOKIE['checkCookies'])) {
   header("location:"); //send to cookies page
} else {
   header("location:"); //send to no cookies page

Try something like that.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.