I've move everything over to a closed server with all error reporting on. This is a testing server and not open to the world so Im not worried about security at this point.
index.php - login page
loginprocess.php - verifies login then sets cookie. login failure goes back to index.php else it goes to readcookie.php
readcookie.php - this is the script that verifies there is a cookie. if not send back to index.php else exit script and display html.
Here is the loginprocess script. It works fine.
# <?php
# $username = $_POST['username'];
# $password = $_POST['password'];
# if($username=="james" && $password=="bond"){
# setcookie("rchjr","true",time()+3600);
# header("location:http://example.com/readcookie.php");
# }else{
# header("location:http://example.com/index.php");
# }
# ?>
This is readcookie.php nothing else is on the page.
Its the reading of the cookie that wont function. per the last posted suggestion I changed it to this. It still does not work.
# <?php
# if (!isset($_COOKIE["rchjr"]) || $_COOKIE['rchjr']!='true'){
# header("location:http://www.kraft.com");
# }
# ?>
Ive tried this on 2 different servers thinking it might be something there. no differences. I'm completely confused.