This can be done quite simlply. Code such as the following in the head section of your documents should work <?php session_start(); if(isset($_GET['theme'])) { $_SESSION['theme'] = $_GET['theme']; } switch($_SESSION['theme']) { case 1: echo "<link rel='stylesheet' type='text/css' href='1.css' />"; break; case 2: echo "<link rel='stylesheet' type='text/css' href='2.css' />"; break; case 3: echo "<link rel='stylesheet' type='text/css' href='3.css' />"; break; default: echo "<link rel='stylesheet' type='text/css' href='default.css' />"; } ?> PHP: Then you link to the different styles using links such as yoursite.com/index.php?theme=1 The preference is stored in the session variables. This method relies on cookies (unless you include the session id in the url) but if they don't have cookies enabled they'll still get your default css file.
Thanks There seems to be an error though. I placed it in the head and got a session error. [B]Warning[/B]: session_start() [[URL="http://www.habboname.com/function.session-start"]function.session-start[/URL]]: Cannot send session cookie - headers already sent by (output started at /home/spiral/public_html/habbo/halloween.php:4) in [B]/home/spiral/public_html/habbo/halloween.php[/B] on line [B]7[/B] [B]Warning[/B]: session_start() [[URL="http://www.habboname.com/function.session-start"]function.session-start[/URL]]: Cannot send session cache limiter - headers already sent (output started at /home/spiral/public_html/habbo/halloween.php:4) in [B]/home/spiral/public_html/habbo/halloween.php[/B] on line [B]7[/B] Code (markup): This is the start of my code if it helps. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>» <?php include("name.php"); ?> - homepage</title> <?php include("meta.php"); ?> <?php session_start(); if(isset($_GET['theme'])) { $_SESSION['theme'] = $_GET['theme']; } switch($_SESSION['theme']) { case 1: echo "<link rel='stylesheet' type='text/css' href='style.css' />"; break; case 2: echo "<link rel='stylesheet' type='text/css' href='stylenormal.css' />"; break; default: echo "<link rel='stylesheet' type='text/css' href='default.css' />"; } ?> </head> <body> <div id="container"> <div id="top-bar" class="title"><b><?php include("name.php"); ?></b> <div id="console"><?php include("top.php"); ?></div> </div> <div id="banner"> <div id="left"> <?php include("nav.php") ?> </div> <div class="right"> <div id="r-top"><?php include("slogan.php") ?></div> <div class="r-content"> PHP:
Yeah - I asked someone on MSN and they told me what to do. I had an include on my pages for the header, but not the very top of the code dang! lol.