How to set, define and change a sites stylesheet via PHP and use the defined value?
Hi all
I have been scouring the net and testing various PHP only methods to enable site visitors to set their preferred style (for example: https://github.com/justnorris/CSS-Style-Switcher, http://stackoverflow.com/questions/1...ie-and-echo-it etc), in this case i want to have a selection of either dark or light of which there is a dark.css and a light.css file in addition to a layout.css style sheet, the default will be the light one. Setting it up using that script is easy enough, however ... :)
I want to be able to retrieve a value that defines what style sheet is being use, that could be the name or just a 0 or 1 value, so for example if the default or light is used the value is set to be 0, if the dark style is used the value is changed to 1 (or we can just use light and dark, really makes no difference.
With that value defined I want to use it elsewhere on the page (site) so it loads content specific to the style chosen, but I cannot work out how to get that value and use it, therefore my request for help :)
Thanks