SharkBait Posted December 12, 2006 Share Posted December 12, 2006 Just a test, I can't seem to post If a kind moderator would like to move this thread into the PHP Help section that would be appreciated.I dont know why it wouldn't let me post the code below into it previously. I tried 7 times to do it Quote Link to comment Share on other sites More sharing options...
SharkBait Posted December 12, 2006 Author Share Posted December 12, 2006 Oh I guess I can, but the bit of post that I want posted, is resetting my connection...Ok on one of my scripts I set the session at the top of the script and then I use javascript to display it at the very bottom of the script, but the bottom alert I use to display the session variable seems to be null where at the top it is not.At the top:[code]<?phpif(isset($_POST['type'])) { $_SESSION['myLastSearch'] = $_POST['type']; echo "<script type=\"text/javascript\">alert('TYPE: {$_SESSION['myLastSearch']}');</script>";}require("includes/header.html");?>[/code]At the bottom of the script[code]<?phpecho "<script type=\"text/javascript\">alert('TYPE: {$_SESSION['myLastSearch']}');</script>";require("includes/footer.html");?>[/code]There are no lines that set $_SESSION['myLastSearch'] anywhere else in the script so I don't know why the bottom is not displaying what the top is.I'm at a loss :) 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.