Solved

no cookies

Posted on 2006-10-22
1
244 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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 create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

749 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