des1017 Posted May 20, 2008 Share Posted May 20, 2008 I'm working on sessions at the moment and was wondering which way would be more secure. Example 1: if ( isset($_SESSION['variable']) ) { display website inside php } else { die } or Example 2: if ( !isset($_SESSION['variable']) ) { die ("You must <a href='loginuser.php'>log in</a> to access this page."); } display website (outside of php) Link to comment https://forums.phpfreaks.com/topic/106449-isset-or-isset-for-security/ Share on other sites More sharing options...
bilis_money Posted May 20, 2008 Share Posted May 20, 2008 !isset i guess since there is no value. but i think isset is not for security purpose. Link to comment https://forums.phpfreaks.com/topic/106449-isset-or-isset-for-security/#findComment-545612 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.