hello got this php script i wrote to diplay stuff depending on the cookie value but getting errors on the setcookie anyone know why or can improve on the code please doo
PHP Code:<?php
if($_GET['CIEC'] == 3)
{
$TWO = "2";
setcookie("ShowOrHide",$TWO);
}
else
{
if (isset($_COOKIE["ShowOrHide"]) AND $_COOKIE["ShowOrHide"] == "1")
{
echo "<a href=\"index.php?CIEC=3\">Close</a>";
}
else if(isset($_COOKIE["ShowOrHide"]) AND $_COOKIE["ShowOrHide"] == "2")
{
//Do Nothing
}
else
{
$ONE = "1";
setcookie("ShowOrHide", $ONE);
echo "<a href=\"index.php?CIEC=3\">Close</a>";
echo "<a id=\"tooCool\" href=\"http://www.w3.com/\"></a>";
}
}
?>




Reply With Quote