Okay so here's the thing. I have this site where people cn post there poems, stories, lyrics, ect.
The site is coded to where there is a php code that tells css to change. The php tells it to change when it is either night or day. Now, I want to code it so the user can switch these two styles in a dropdown menu..
For example, I have three styles.
Each of the styles has its own folder and two .css stylesheets.
Something like this.
(/styles/theme1/night.css)
(/styles/theme1/day.css)
Now when the user changes the style I want the user to change it to.
(/styles/theme2/night.css)
(/styles/theme2/day.css)
How would I go about in coding this?
My current script is:
<?php $hour = date('H'); if($hour > 6 && $hour < 20) { print '<LINK REL="STYLESHEET" TYPE="text/css" HREF="style/folder/day.css">'; } else { print '<LINK REL="STYLESHEET" TYPE="text/css" HREF="style/folder/night.css">'; } ?>
Maybe someway to change the folder name to whatever the dropdown tells it to change, and have some sort of javascript cookie code, which javascript and I never get along.
Thanks,
.daydream.