Hi, i have done the [URL=http://www.alistapart.com/articles/phpswitch/]http://www.alistapart.com/articles/phpswitch/
So i built one myself, it switched the styles fine!! but i cant(dont no how) to retreive the cookie and call the right .css file i looked at [URL=http://php.inspire.net.nz/manual/en/function.setcookie.php]php.net-cookies
Thanks and here is the code.
[code=php]
<?php
switch($HTTP_GET_VARS[‘style’]){
case ‘grey’:
echo setcookie(“grey”, true);
echo ‘<link rel=”stylesheet” type=”text/css” media=”screen” title=”grey” href=”styles/grey.css” />’;
break;
case ‘blue’:
echo setcookie(“blue”, true);
echo ‘<link rel=”stylesheet” type=”text/css” media=”screen” title=”blue” href=”styles/blue.css” />’;
break;
case ‘red’:
echo setcookie(“red”, true);
echo ‘<link rel=”stylesheet” type=”text/css” media=”screen” title=”red” href=”styles/red.css” />’;
break;
case ‘yellow’:
echo setcookie(“yellow”, true);
echo ‘<link rel=”stylesheet” type=”text/css” media=”screen” title=”yellow” href=”styles/yellow.css” />’;
break;
default:
if(isset($_COOKIE[”])){ $_GET[‘style’] = “$_COOKIE”; }
break;
}
?>
Sheldon