I’ve came across many ’style-changers’, most of them either use Javascript or PHP to set the cookie, but this time I’ll use PHP. Its much more beneficial to do so because if I had used Javascript, browsers that don’t support Javascript will be left out.
This is a very basic, simple and easy to use style changer. I tried to simplify the codes as much as possible.
So unlike last time where I just handed out the links, this time I’ve included many notes in each file. Basically this style-changer consists of two file, index.php and switcher.php. switcher.php is used to set the cookie and redirect the user back from where he/she came where as index.php is a dummy page with a basic style, once you click on a link on the top right of the index.php page. It will change the style using the $_GET method. The server will then set a cookie so that when ever you visit that particular site, the style will be what you picked earlier unless you clear all your cookies.


No comments
No comments yet...