I've been trying to load themes up using cookies. the cookie won't set right when i call to the script like settheme?theme=red,blue,orange,etc..
this is the script i'm using:
<?
GLOBAL $theme;
switch ($theme) :
case("red") :
setcookie("theme", red, (time() + (3600 24 365 10)), "/");
header("Location: $HTTP_REFERER");
break;
case("green") :
setcookie("theme", green, (time() + (3600 24 365 10)), "/");
header("Location: $HTTP_REFERER");
break;
case("orange") :
setcookie("theme", orange, (time() + (3600 24 365 10)), "/");
header("Location: $HTTP_REFERER");
break;
default:
setcookie("theme", blue, (time() + (3600 24 365 10)), "/");
header("Location: $HTTP_REFERER");
endswitch;
?>
It will only set the $theme too blue and i have no idea why. thanks!