| 4:44 pm on Nov 13, 2002 (gmt 0)|
The trick (or one of) is to carry a variable saying which sheet to use in a Session [php.net] which can be changed be links like you've given above.
Then on each page you need to check $_GET['sheet']
and set the sheet like this:
then plonk the little fella in your html....
| 5:57 pm on Nov 13, 2002 (gmt 0)|
As of right now the only page using this would be the index page and should use the main sheet every time they revisit the page and have to change it per visit.
Or is that not how it works?
| 6:00 pm on Nov 13, 2002 (gmt 0)|
How do you want it to work?
| 6:18 pm on Nov 13, 2002 (gmt 0)|
I really don't know what I'm doing. I just started looking into this yesterday.
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.
| 6:21 pm on Nov 13, 2002 (gmt 0)|
Not that I know of....
Why would you want them to have to choose black again? -- A cookie that stores their preference might be nicer..
Admitedly I've not done this on a site I do similarly on but, it's on the TODO list ;)
| 6:29 pm on Nov 13, 2002 (gmt 0)|
I would be nice to save it in a cookie but to be honest it looks kind of tricky to accomplish especially since I've never done it before and seems to require a lot of information that I don't already know.
Thats why I was trying to find the easiest route possible.
| 6:56 pm on Nov 13, 2002 (gmt 0)|
$sheet="defualt"; // no cookie - get the default
setcookie("sheet", $sheet, time()+30412800); // set/reset cookie for a year
$stylesheet=$sheet."css"; // set stylesheet
<link rel="stylesheet" type="text/css"
Untested, not properly thought out and likely not to work ;) But, may help get you started...
| 7:02 pm on Nov 13, 2002 (gmt 0)|
Thanks I will try it, even if that doesn't work it will still be helpful in figuring out how it works as an example.