470,855 Members | 1,330 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,855 developers. It's quick & easy.

Sessions? Other means?

I have a (dummy) page that uses PHP to change CSS - so that different
looks can be applied without loading the complete page again etc, and to
ease the deployment of new looks - much like www.csszengarden.com does
(actually part of my script is from their site).

Anyway - currently the PHP-script only covers the first page - if I have
subpages, the different CSS doesn't "follow through" - I'm wondering how
I can make it.

The code I'm using is this (with comments):


$tempCSS = $HTTP_GET_VARS["cssfile"];
if ($tempCSS != "") {
$loadCSS = $tempCSS;
} else {
/* sets a default CSS file if no querystring specified */
$loadCSS = "default.css";
$currentDesign = $loadCSS;


<!-- make sure this goes somewhere between <head> and </head> -->
<link rel="stylesheet" type="text/css" href="<?php echo $loadCSS; ?>"
title="default" media="screen" />

<!-- to link any particular stylesheet later, just add a querystring to
the current page: -->
<a href="thispage.html?cssfile=/002/002.css">Change Style</a>

How can I take the current value from the address bar and add it to any
link that's a local link to subpages?

Jul 17 '05 #1
0 1277

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Gary Petersen | last post: by
7 posts views Thread by John | last post: by
3 posts views Thread by Andrew Durstewitz | last post: by
14 posts views Thread by Guy Hocking | last post: by
3 posts views Thread by Miguel | last post: by
6 posts views Thread by Daniel Walzenbach | last post: by
9 posts views Thread by dino d. | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.