Forum Moderators: not2easy
Below is from the source of a site doing what I want
<link rel='stylesheet' type='text/css' href='/themes/orange/css-orange.css'>
<a href="index.php?theme=blue" onMouseOver="(window.status='Blue theme'); return true"></a>
Is there a script for this? If so, I can't find it.
<a href="blah.php?sheet=black">blah</a>
Then on each page you need to check $_GET['sheet']
and set the sheet like this:
$stylesheet=$sheet.".css";
then plonk the little fella in your html....
Nick
I wasn't sure if what you said before would be exactly what I needed, but it may be I really don't know.
I just want them to be able to click on the word black and change the background to black and the text to white, but the next time they visit my site if they want to see the black background again they would have to click on black again.
I don't know much about php and thought that there might be a copy and paste script to put in the html and then just add similar links like in my first message here.
[pre]
<?
if(!$sheet) {
$sheet="defualt"; // no cookie - get the default
}
setcookie("sheet", $sheet, time()+30412800); // set/reset cookie for a year$stylesheet=$sheet."css"; // set stylesheet
?>
<html>
<head>
<link rel="stylesheet" type="text/css"
href="<?=$stylesheet;?>" />
</head>
etc...etc...
[/pre]
Untested, not properly thought out and likely not to work ;) But, may help get you started...
Nick