The piece of code below works fine in firefox but doesnt work in IE. can anyone tell me whts the solution to this. <?php if (isset($_COOKIE["imtcookie"])){ $head = "includes/header1.php"; } else{ $expiry = time()+ 30; setcookie("imtcookie", "", $expiry); $head = "includes/header2.php"; header("Set-Cookie: imtcookie=present; expires=$expiry"); } ?>
<?php if (isset($_COOKIE['imtcookie'])) { $head = "includes/header1.php"; } else { $expiry = time()+60; setcookie("imtcookie", "present", $expiry); $head = "includes/header2.php"; } ?> Well this works. I think the problem was "present" when i gave the value for the second field and removed the line <? header("Set-Cookie: imtcookie=present; expires=$expiry"); ?> it started working