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 Quote Link to comment 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'>"; Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.