mkosmosports Posted October 9, 2007 Share Posted October 9, 2007 Hey, Ive got the following two lines of code: header('Location: ' $_SESSION['fromurl']'); unset($_SESSION['fromurl']); Will the unsetting of that session variable take place or does the script end after the redirect. Whats the rule on that? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/72478-code-after-redirect/ Share on other sites More sharing options...
pocobueno1388 Posted October 9, 2007 Share Posted October 9, 2007 You can always test it. On the top of the page it is redirecting to, put this: <?php if (isset($_SESSION['fromurl'])){ echo "It wasn't unset"; } else { echo "The session was unset!"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/72478-code-after-redirect/#findComment-365445 Share on other sites More sharing options...
mkosmosports Posted October 9, 2007 Author Share Posted October 9, 2007 True, I can do that. But you're making me work pocobueno.. Quote Link to comment https://forums.phpfreaks.com/topic/72478-code-after-redirect/#findComment-365448 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.