Baseball Posted December 24, 2009 Share Posted December 24, 2009 if (session_id() == "") { echo "hey"; exit; } this doesnt work i have session start n stuff too is this correct waY? Link to comment https://forums.phpfreaks.com/topic/186229-if-session_id-exit-if-_sessionuser_name-echo-hey/ Share on other sites More sharing options...
Baseball Posted December 24, 2009 Author Share Posted December 24, 2009 if (session_id() == "") { echo "hey"; exit; } lol wow im a idiot this doesnt work i have session start n stuff too is this correct waY? Link to comment https://forums.phpfreaks.com/topic/186229-if-session_id-exit-if-_sessionuser_name-echo-hey/#findComment-983521 Share on other sites More sharing options...
trq Posted December 24, 2009 Share Posted December 24, 2009 Your probably better off looking for a specfic key within the $_SESSION array. eg; if (isset($_SESSION['isloggedin'])) { echo "Hey"; } Link to comment https://forums.phpfreaks.com/topic/186229-if-session_id-exit-if-_sessionuser_name-echo-hey/#findComment-983564 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.