Cookie problem...
Posted: Mon Oct 20, 2003 9:55 am
Ok so Instead of having multiple php pages I decided Ill use variables thatll set the cookie to set the theme.
Starts simply with
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....
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
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