Why doesn't this simple script work? even if i use the first example it doesn't work. But what I want, is that the second script works.
<?php
Setcookie("SetLang","$lang", time()+1296000,"/");
Header("Location: /home.php?lang=$lang");
?>
--- setcookie.php
<?php
if(!empty($lang)) {
Setcookie("SetLang","$lang", time()+1296000,"/");
Header("Location: /home.php?lang=$lang"); }
else {
Setcookie("SetLang","none", time()+1296000,"/");
Header("Location: /splash.php"); }
?>
anyone a clu?