Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

no cookies

Posted on 2006-10-22
1
Medium Priority
?
260 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

670 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