Ok your setting $Language to the value of a cookie.
Then if $Language is empty your writing a cookie.
And then your outputting the empty value in $Language
try this
PHP Code:<?
$Language=($HTTP_COOKIE_VARS["Language"]);
if (empty($Language)) {
setcookie("Language","English",time() + 43200);
echo"<script>alert('English');</script>";
}else{
echo"<script>alert('$Language');</script>";
}
?>




Reply With Quote