phpwiz Posted August 3, 2009 Share Posted August 3, 2009 is it possible that i can ake like a style switcher, like i make two layouts and the user has the option to switch the style as they please. please help Link to comment https://forums.phpfreaks.com/topic/168584-style-switcher/ Share on other sites More sharing options...
smerny Posted August 3, 2009 Share Posted August 3, 2009 yes... one way could be instead of connecting each page to a css sheet directly... include a page called "styles.php" or something... and in there you could have something like... if ($_SESSION['style'] == 1) echo "<link rel=StyleSheet href='style1.css' type='text/css'>"; if ($_SESSION['style'] == 2) echo "<link rel=StyleSheet href='style2.css' type='text/css'>"; Link to comment https://forums.phpfreaks.com/topic/168584-style-switcher/#findComment-889237 Share on other sites More sharing options...
phpwiz Posted August 3, 2009 Author Share Posted August 3, 2009 Ok, but how do i have them create the session? Link to comment https://forums.phpfreaks.com/topic/168584-style-switcher/#findComment-889238 Share on other sites More sharing options...
5kyy8lu3 Posted August 3, 2009 Share Posted August 3, 2009 Ok, but how do i have them create the session? just have a style column in the database. if the user has style set to 1, then include style_1.php. if that column contains 2, then include style_2.php. unless i'm reading your question wrong... lol Link to comment https://forums.phpfreaks.com/topic/168584-style-switcher/#findComment-889243 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.