So I am trying to hide or show options if the user is logged in or not.
I have this simple statement, its always showing no regardless if I am logged in or not.
if( !isset($_SESSION) ){
echo "yes";
}
else {
echo "no";
}
I have also tried
function __construct()
{
parent::__construct();
$this->is_logged_in();
}
if(is_logged_in())
{
echo "yes";
}
else
{
echo "no";
}
Neither works, I also think the first one if simpler, but I am not sure what method would be better.