Changing background color under PHP control
Posted 28 February 2006 - 11:03 PM
Things get slightly more complex because the seasons have some options (Advent can be Purple or Blue, for example).
Any ideas about how I can accomplish this? I'm thinking that the following might work:
i) Establish a session variable called liturgical_color, and then use a short script to put it into a style sheet in among all the other style commands:
ii) <?php echo "background-color:".$_SESSION['liturgical_color']".";"; ?>
Do browsers (or most browsers?) handle css directives out of a php script?
Any help gratefully appreciated!
Tony (What ever happened to COBOL ;-)
Posted 09 March 2006 - 12:20 AM
This is how most sites have different modules that allow for color changes, they simple have a thing like:
Where $background is a query into a database of the different possible colors and usernames...it then picks out their color selection and replaces all the coding you did with the word "brown" thus making the background color brown for that selected user.
Posted 12 October 2007 - 11:51 PM
Like the iGoogle background that changes based on your zip code for weather and such, I'd like to be able to capture the time the user visiting is in (wherever in the world) and display a background color related to the time of day. (i.e. black for darkness and yellow for noon or similar.).
Any help would be greatly appreciated.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users