cookie issue - win internet explorer

Posted on 2007-08-07
Last Modified: 2008-07-12
Hi, I have a script that either provides or denies entry to a user based on their answer to the question: Are you 18?

It works fine across most browsers though for some reason it crashes in Internet Explorer


$rurl = (isset($_REQUEST['rurl']))?$_REQUEST['rurl']:"/index";

// if the session exists - it is because I have answered YES - re-direct user
if(isset($_SESSION['ageok'])) header("Location:$rurl");

//If I have a cookie, initiate session and re-direct
      $_SESSION['ageok'] = TRUE;

// If I answer YES, create session, set cookie and re-direct
if($_REQUEST['ol'] == "yes"){
      $_SESSION['ageok'] = TRUE;

// If I answer NO, re-direct to save place
if($_REQUEST['ol'] == "no"){

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" xml:lang="en-gb" lang="en-gb">
<title>Are You 18?</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


<h1>Are you 18?</h1>
<h2><a href="age-check.php?ol=yes&rurl=<?php echo $rurl; ?>" title="YES I AM OVER 18">YES</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="age-check.php?ol=no&rurl=<?php echo $rurl; ?>" title="NO I AM UNDER 18">NO</a></h2>



I place this at the top of site index pages that I wish to restrict access to (entry via age check):

$rurl = $_SERVER['REQUEST_URI'];

For some strange reason this is provoking errors in Internet Explorer 6 and 7. The operation aborts and the page cannot be loaded.

Is there any obvious reason for this?

Another detail that may affect this: the swfobject ( ) is employed to insert flash into the page.
Question by:myrepublic
    LVL 3

    Expert Comment

    Check that you have cookies enabled in your internet options settings.  reason i say this is that other browsers (such as firefox) dont use the windows/IE settings for cookie blocking.

    Author Comment

    Turned out to be an issue with Slimbox (Lightbox variant) as documented here:
    LVL 1

    Accepted Solution

    PAQed with points refunded (500)

    EE Admin

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    These days socially coordinated efforts have turned into a critical requirement for enterprises.
    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 count occurrences of each item in an array.

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now