HTML
|
|
|
|
************************************************
* This application consists of 2 php documents *
************************************************
//page1.php.
//Put this code between the <head> tags
<? if ($Stylesheet == "")
{
echo "<link rel='STYLESHEET' type='text/css' href='default.css'>";
}
else
{
echo "<link rel='STYLESHEET' type='text/css' href='".$HTTP_COOKIE_VARS["Stylesheet"]."'>";
} ?>
//page1.php
//put this code anywhere between the body of the document.
<form action="page2.php" method="post">
<select name="css">
<!-- change option value to your stylesheets -->
<option value="blue.css">Red</option>
<option value="grey.css">Blue</option>
<option value="default.css">Default</option>
</select>
<input type="submit" value="Set stylesheet">
</form>
//page2.php
//put this code at the beginning of your document(before anything else)
<?
setcookie ("Stylesheet", "$css"); ?>
//page2.php
//and this link to go back to page1.php and you can see the canges. Pretty simple ;)
|
|
|
Usage Example
|
|
|
Rate This Script
|
|
|
|