First off.. here is my website: http://chemical.dfonline.net/chemical
I have made some PHP that lets the user select different colour schemes depending on what he/she likes. It decides which Stylesheet to use based on a GET variable...
<?php
error_reporting ('e_all'); // Set PHP error reporting to all errors
// Declare style variables
global $style;
global $skin;
// Check to see if skin was specified with ?skin=skinname
if ($_GET[skin]) {
// A was specified, determine which
$skin = $_GET[skin]; // Get variable from GET header
if ($skin == "classic") { // Navy Blue Colours
$style = "classic.css";
} elseif ($skin == "red") { // Red
$style = "red.css";
} elseif ($skin == "lightblue") { // Light Blue
$style = "blue.css";
} else {
$style = "default.css"; // Unknown - Revert to default
}
} else {
// ?skin= not specified, use default skin
$style = 'default.css';
}
?>
<title>chemicalfusion</title>
<? echo "<link rel='stylesheet' type='text/css' href='$style'>\n"; ?>
Then, I've got it adding a ?skin=whatever to the URL of the page.
The one thing I want it to be able to do is to save the selection of the user in a cookie, or by some other method... I just haven't got the faintest clue how though..
http://chemical.dfonline.net/chemical/index.phps - for the source, but really, all this does is links to header and footer files...