Starts simply with
Code: Select all
if(!$_COOKIE['theme'])
{if($theme == "wuggy")
{setcookie ("theme", "wuggy", time()+60*60*24*30,'/','.wuggawoo.co.uk', 0);}
else
{setcookie ("theme", "default", time()+60*60*24*30,'/','.wuggawoo.co.uk', 0);}}Basically, if the user doesnt define theme in the url then it should automatically set the $_COOKIE['theme'] to default...however it does and doesnt sometime...ANYWAY
onto the actual CSS switch....
Code: Select all
<link rel="stylesheet" href="includes/styles/<? echo "".$_COOKIEї'theme']."" ?>.css" type="text/css">well, it just isnt working no matter what I do...you can check it out forumz.wuggawoo.co.uk (dont use the scroll box at the top because that just changes the page (index.php to wuggy.php) - only index.php has the above code in.
To test just bung ?theme=wuggy or ?theme=forumz and you should note that it doesnt work