basically I have a folder with several pages and a cookie is set before you can view any of them. this cookie works wonderfully on all pages untill I try to check the cookie within an include file
the include file (menu.php) basically looks like this:
<?php
if ($_COOKIE['AccessSciencesAdmin']) { ?>
listone <br>
listtwo<br>}
else{
sorry no listing available
}
the file that I am including it in has the following code:
<?php
require "checkcookie.php";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><body>
<?php
include ('menu.php');
</body>
the checkcookie.php works beautifully on all pages it basically checks to see if the user has the correct cookie with this:
<?
if (empty($_COOKIE['mycookie'])) {
$message = 'Your login has expired, please login again';
#header('Status: 302 Moved Temporarily');
header("Location: admin/index.php?message=" . urlencode($message));
exit(0);
} else {
setcookie('mycookie', '1',0,'/');
}
?>
I have looked every where to try and find out why the cookie seems to disapear in include files any where in any Directory?????
any Ideas??
Any one?