zGrassman Posted October 11, 2007 Share Posted October 11, 2007 session_start(); if($_SESSION[loggedin]) { include('sidebar.php'); include('connect.php'); } else{ print "bla"; } Or should i use session_start(); if(isset($_SESSION[loggedin])) { include('sidebar.php'); include('connect.php'); } else{ print "bla"; } or does it really matter Quote Link to comment https://forums.phpfreaks.com/topic/72741-solved-isset-or-no-isset/ Share on other sites More sharing options...
Lukela Posted October 11, 2007 Share Posted October 11, 2007 If you are trying to check if $_SESSION[loggedin] is set to a value use session_start(); if(isset($_SESSION[loggedin])) { include('sidebar.php'); include('connect.php'); } else{ print "bla"; } if not use the other one. Really based on what you are doing. Quote Link to comment https://forums.phpfreaks.com/topic/72741-solved-isset-or-no-isset/#findComment-366861 Share on other sites More sharing options...
zGrassman Posted October 11, 2007 Author Share Posted October 11, 2007 yea, im checking to see if the value is == to 1. im new at this stuff, so i guess i want to check if a user is signed in sorta speak. if they are then it shows stuff, if it isnt it shows something else. i changed the source to isset and it works fine. both work fine, i was just curious. so i guess it doesnt matter? Quote Link to comment https://forums.phpfreaks.com/topic/72741-solved-isset-or-no-isset/#findComment-366869 Share on other sites More sharing options...
Lukela Posted October 11, 2007 Share Posted October 11, 2007 Well just to be on the safe side, put the isset Quote Link to comment https://forums.phpfreaks.com/topic/72741-solved-isset-or-no-isset/#findComment-366894 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.