First create the select menu.
Code:
<select name='style' id='style'>
<option value='_1'>style 1</option>
<option value='_2'>style 2</option>
</select>
then create the php code
Code:
<?php
$style_set = "_1";//set the default
if(@$_REQUEST['style'] <> ""){
$style_set = $_REQUEST['style'];
$_SESSION['set_style'] = $style_set;
header("Location: ".$_SERVER['PHP_SELF']);//redirect so we can show the changes to the style
}
if(isset($_SESSION['set_style'])){$style_set = $_SESSION['set_style'];}
//set style if session isset
?>
then you have your stylesheet included
Code:
<?php
echo "<link rel=\"stylesheet\" href=\"style$style_set.css\" media=\"all\" />";
?>
if you don't want to use sessions or cookie store the value from the form in the database, then have a recordset pulling the data and set the
Code:
$style_set = rs['style'];