To start you, you can simply make dynamic style links:
<link rel="stylesheet" href="<?=$style?>" type="text/css"/>
And specify the links that change them:
<a href="/page.php?theme=racecar">Racecar</a>
Assign $styleaccording to the query line on the server , it would also be a good idea to default something in case the user decides to change the URL:
<?php
$stylesArr = array('racecar', 'magenta', 'cartman');
if(isset($_GET['theme']) && in_array($_GET['theme'], $stylesArr)) {
$style = $_GET['theme'] . '.css';
setcookie("theme", $style, time()+(3600*24*30));
} else {
if(isset($_COOKIE['theme']) && in_array($_COOKIE['theme'], $stylesArr)) {
$style = $_COOKIE['theme'] . '.css';
} else {
$style = 'default.css';
}
}
?>
<link rel="stylesheet" href="<?=$style?>" type="text/css"/>
, cookie .