Solved

no cookies

Posted on 2006-10-22
1
249 Views
Last Modified: 2008-03-17
hello,
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?
0
Comment
Question by:Sabrin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 19

Accepted Solution

by:
BrianGEFF719 earned 500 total points
ID: 17785734
Hi Sabrin,

index.php code:

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


cookieCheck.php code:

if (isset($_COOKIE['checkCookies'])) {
   header("location: http://www.mysite.com/cookiesWork.php"); //send to cookies page
} else {
   header("location: http://www.mysite.com/noCookies.php"); //send to no cookies page
}


Try something like that.


-Brian
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question