crazylegsmurphy Posted July 26, 2008 Author Share Posted July 26, 2008 I'm not sure... Right now the links are passing the variable (spring) and the date code is picking it up...it actually seems to be changing to the correct css file now....but I don't know where to actually set the session...and that's why it's probably not displaying. Quote Link to comment https://forums.phpfreaks.com/topic/116742-two-questions-php-css-switch-link-code-check/page/2/#findComment-600539 Share on other sites More sharing options...
crazylegsmurphy Posted July 27, 2008 Author Share Posted July 27, 2008 Ok, so I have this... <?PHP session_start(); $_SESSION['css'] = "spring"; $section='community'; include('../_includes/top.php'); ?> <div id="content-preview"> <?php echo "session is: ".$_SESSION['css']; ?> <p class="italic">Engage, Inspire...</p> <p><a class="more" href="community.php" title="community">More...</a></p> </div> <?PHP include('../_includes/bottom.php'); ?> And it shows "spring" when I manually type in the session variable into the code...but how do I get it so it fills it in with the correct variable when the link is clicked? $_SESSION['css'] = $_GET['css']; is this right? Quote Link to comment https://forums.phpfreaks.com/topic/116742-two-questions-php-css-switch-link-code-check/page/2/#findComment-600555 Share on other sites More sharing options...
DeanWhitehouse Posted July 27, 2008 Share Posted July 27, 2008 try it Quote Link to comment https://forums.phpfreaks.com/topic/116742-two-questions-php-css-switch-link-code-check/page/2/#findComment-600558 Share on other sites More sharing options...
crazylegsmurphy Posted July 27, 2008 Author Share Posted July 27, 2008 I did... It works...meaning it shows the correct season in the echo statement...but when I change the page, it defaults back. Quote Link to comment https://forums.phpfreaks.com/topic/116742-two-questions-php-css-switch-link-code-check/page/2/#findComment-600559 Share on other sites More sharing options...
crazylegsmurphy Posted July 27, 2008 Author Share Posted July 27, 2008 Anyone have any ideas? once I get this working I can sign off on this thing and go out into the real world.... Quote Link to comment https://forums.phpfreaks.com/topic/116742-two-questions-php-css-switch-link-code-check/page/2/#findComment-600603 Share on other sites More sharing options...
crazylegsmurphy Posted July 27, 2008 Author Share Posted July 27, 2008 anyone? I'm sorry to keep posting in here, but this is so close to working and a little help from someone might clear it up right away. Quote Link to comment https://forums.phpfreaks.com/topic/116742-two-questions-php-css-switch-link-code-check/page/2/#findComment-600705 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.