Here's what I got working:
index.php
<?php
if( empty($_GET['style']) || !isset($_GET['style']) )
{
$_GET['style'] = 'default';
}
$style = './styles/'.$_GET['style'].'.css';
?>
<html>
<head>
<title>A Certain Style :: <?php echo $_GET['style']; ?></title>
<link rel="stylesheet" type="text/css" href="<?php echo $style; ?>">
</head>
<body>
<div id="wrapper">
<p>This should change depending upon the style!!<br><br>
<form action="changestyle.php" method="post">
<select name="style" onchange="this.form.submit()">
<option value="null" selected>Please Choose a Style</option>
<option value="blue">Blue</option>
<option value="pink">Pink</option>
<option value="green">Green</option>
<option value="default">Default</option>
</select>
</form></p>
</div>
</body>
</html>
changestyle.php
<?php
$style = $_POST['style'];
if($style == 'null')
{
$url_suffix = 'default';
}
else
{
$url_suffix = $style;
}
$url = 'index.php?style=';
header("Location: ".$url.$url_suffix);
?>
default.css
body
{
background: #f7f7f7;
text-align: center;
}
#wrapper
{
width: 500px;
margin: 0 auto;
padding: 0;
border: 2px solid #000;
background: #ccc;
text-align: center;
}
#wrapper p
{
width: 500px;
float: left;
text-align: left;
margin: 5px 10px;
}
#wrapper p form
{
width: 150px;
float: left;
margin: 0 auto;
padding: 0;
}
I changed the background colors in the CSS files to what I wanted. This does work, I know for a fact.
Viewable Here
~Brett