hi i have this php stylesheet selector which i am trying to edit
[code=php]
//stylesheet.php
<?php
if(isset($_COOKIE[“stylesheets”])) {
$val = $_COOKIE[“stylesheets”];
if ($val == “Green”) {
echo “<link rel=”stylesheet” href=”style-green.css” type=”text/css”>”;
}
else if ($val == “Red”) {
echo “<link rel=”stylesheet” href=”style-red.css” type=”text/css”>”;
}
else if ($val == “Black”) {
echo “<link rel=”stylesheet” href=”style-black.css” type=”text/css”>”;
}
else {
echo “<link rel=”stylesheet” href=”style-blue.css” type=”text/css”>”;
}
}
else {
echo “<link rel=”stylesheet” href=”style-blue.css” type=”text/css”>”;
}
//changeprefs.php
<?PHP
$loc = $_SERVER[“HTTP_REFERER”];
$css = $_GET[“file”];
setcookie(“stylesheets”,$css,time()+31536000); #one year
header (“Location:$loc”);
?>
on page.php
<?php include(“stylesheet.php”); ?>
…..
….
<p><a href=”changeprefs.php?file=Blue”>Blue</a><br><br><img src=”table-title1.jpg” width=”100″></p>
<p><a href=”changeprefs.php?file=Green”>Green</a><br><br><img src=”table-title3.jpg” width=”100″></p>
<p><a href=”changeprefs.php?file=Red”>Red</a><br><br><img src=”table-title2.jpg” width=”100″></p>
<p><a href=”changeprefs.php?file=Black”>Black</a><br><br><img src=”table-title4.jpg” width=”100″></p>
what i am trying to do is a bit like id say zen garden so you have [url]http://www.site.com/index.php?stylesheet=layout.css[url]http://www.site.com/index.php?stylesheet=http://www.othersite.com/style.css
something like that could anyone point me in right direction or help me out trying to figure this out