mikebyrne Posted April 11, 2008 Share Posted April 11, 2008 In the below code I'm just wondering why we use the Isset? <?PHP if (isset($_SESSION['usertype']) && $_SESSION['usertype'] == 2) { echo "You're logged in"; } else { echo "You're not logged in"; } ?> Link to comment https://forums.phpfreaks.com/topic/100599-solved-quick-amp-simple-question-in-relation-to-isset/ Share on other sites More sharing options...
zenag Posted April 11, 2008 Share Posted April 11, 2008 ReIf a variable has been unset with unset(), it will no longer be set. isset() will return FALSE if testing a variable that has been set to NULL.turns TRUE if var exists; FALSE otherwise. Link to comment https://forums.phpfreaks.com/topic/100599-solved-quick-amp-simple-question-in-relation-to-isset/#findComment-514495 Share on other sites More sharing options...
mikebyrne Posted April 11, 2008 Author Share Posted April 11, 2008 Thanks again! Link to comment https://forums.phpfreaks.com/topic/100599-solved-quick-amp-simple-question-in-relation-to-isset/#findComment-514512 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.