I want to hide a image button when session is destroyed or user logs out in my code <div class=right icons> : I want to hide the image button while user logs out or there is no session created. ( Right icons class ) this image <img class="upload" src="assets/images/icons/upload.png"> button


    
            <div class="rightIcons">
                <a href="upload.php">
                    <img class="upload" src="assets/images/icons/upload.png">
                </a>
                <?php echo ButtonProvider::createUserProfileNavigationButton($con, $userLoggedInObj->getUsername()); ?>
            </div>

        </div>

        <div id="sideNavContainer" style="display:none;">
            <?php
            $navigationProvider = new NavigationMenuProvider($con, $userLoggedInObj);
            echo $navigationProvider->create();
            ?>
            
        </div>

        <div id="mainSectionContainer">
            <div id="mainContentContainer">