This link has been bookmarked by 38 people . It was first bookmarked on 24 Aug 2006, by krazykiwi -.
-
20 Nov 10
-
07 Feb 10
-
30 Jun 08
Smellypunks .How to use PHP to create a style sheet switcher that lets users switch between two different layouts.
Bookmarks Graphics_stuff_&_web_design style_sheet_switcher From_Delicious_11.8.2010
-
17 Apr 07
-
23 Feb 07
-
09 Feb 07
-
13 Oct 06
-
<?php$layout = (isset($_COOKIE['layout']) && ($_COOKIE['layout'] == "zoom")) ? "main" : "zoom";setcookie("layout", $layout, time()+31536000, '/');$ref = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : "http://{$_SERVER['SERVER_NAME']}/";header("Location: $ref");?>
To switch styles, all you need to do is activate the link to the styleswitcher. As you may have noticed if you have tried that, the URL that invokes the styleswitcher is always the same: /styleswitch/. The link leads to a php file that looks like this:
Here’s what happens, line by line:
-
-
04 Sep 06
-
29 Aug 06
-
28 Aug 06
-
25 Aug 06
-
24 Aug 06
-
23 Aug 06
Page Comments
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.