scarhand Posted February 19, 2010 Share Posted February 19, 2010 is is safe to just use the header() function to redirect someone if they are, say, not logged in? or should i always put a die() function underneath the header() function? Quote Link to comment https://forums.phpfreaks.com/topic/192596-question-about-header-security/ Share on other sites More sharing options...
PFMaBiSmAd Posted February 19, 2010 Share Posted February 19, 2010 A header redirect tells the browser to request the new URL. The rest of the code on the page is still executed unless you do something to prevent it, such as a die/exit statement or a conditional statement that is FALSE. Quote Link to comment https://forums.phpfreaks.com/topic/192596-question-about-header-security/#findComment-1014680 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.