This question already has an answer here:
I am using the $_SESSION global variable on each page on my application so that I can control access to my site with login functionality. Instead of using the following path that searches for TRUE else FALSE, as showed in the example below, how can you reverse the condition?
<?php
if (isset($_SESSION['id'])) {
echo $_SESSION['id'];
} else {
echo "You are not logged in!";
}
?>
</div>