TECHNICAL xhtml, css, textpattern and coding articles
PHP Style Switcher
(This article was originally at 4-ever.org. Exactly the same method is used here on 01010.)
The benefits of giving your website visitors more choice are obvious. With PHP style switching, it is easy to offer different colour schemes, font sizes etc. Javascript switching works great but if the user has javascript disabled on their browser it doesn't work at all. PHP switching, however, does not depend on client settings because it does the switching on the server. Hence it should work for everyone. The only downside I see is that it is slower than the instantaneous javascript. But I do not think many people will mind waiting for the page to refresh if they find it more usable or attractive when it is reloaded.
The style switching at 4-Ever and here at 01010 is based on Stuff and Nonsense: Strategies for CSS Switching in Digital Web Magazine by Christopher Schmitt, Mark Trammell, Ethan Marcotte, Todd Dominey & Dunstan Orchard. You really need to read that excellent article for a good understanding. Your ISP will also need PHP on their server but I think this is pretty well universal nowadays.
Download the code and brief explanation. It is surprisingly small. Also included is my method of using eight buttons instead of sixteen, which some people might like.