I use a style switcher on my site although it works a bit differently. $dxstyle = $_COOKIE["dxstyle"]; $replace_strings = array("../" , "..\\" , "/..", "\\..", "."); $dxstyle = str_replace($replace_strings, "", $dxstyle);
<style type="text/css" media="screen"> <?php echo "@import url("; if (file_exists("style".$dxstyle.".css")) { echo "/style".$dxstyle.".css"; } else { echo "/style5.css"; } echo ");"; ?> </style> Sorry if that is a bit hard to read. What happens is when you click on the style changer you are set a cookie. The php code above reads which style you're using from the cookie and loads the correct style. If no style is set it loads the default one. In action here: http://blog.dalegroup.net (although all the other styles are dodgy :p) Michael Dale [EMAIL PROTECTED] ****************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************