Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: Cookie Problem with IE6.0...Help!


Message #1 by "Bill" <bige88fan@c...> on Tue, 19 Nov 2002 20:07:48
Ok fellas..I have this code, and have tested it in netscape and IE. 

<?php
//cookie.php

//this is a cookie test script.
if(!isset($_COOKIE['username4']) and (!isset($_COOKIE['password4']))){

//setcookie("username4","username");
//setcookie("password4","password");

header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"'); 
setcookie("username4", "username", time() + 3600, '/', '.domain.com');
setcookie("password4", "password", time() + 3600, '/', '.domain.com');

echo "cookie has been set click <a href=\"$PHP_SELF\">HERE to continue.";

}else{

//get vars, un-encrypt
$username = $_COOKIE['username4'];
$password = $_COOKIE['password4'];

echo "Logged in successfully. Username is $username, password is 
$password";
}

?>

It's just a test script as you can see. Everything works FINE in 
Netscape! However, MSIE does not interpret it correctly for some 
reason...and it should. Is there a problem with my syntax or something? 
Thanks,

-Billy.

  Return to Index