title: unable to change login menu to logout after user logs in PHP
body: <p>I am trying to build authentication syatem in my website and i am able to successfully register and login but after login my menu bar is still showing me option for login.</p>
  
  <pre><code>&lt;div class="collapse navbar-collapse" id="myNavbar"&gt;
    &lt;ul class="nav navbar-nav navbar-right"&gt;
     &lt;li&gt;&lt;a href="index.php"&gt;HOME&lt;/a&gt;&lt;/li&gt;
     &lt;li&gt;&lt;a href="#services"&gt;REGISTRATION&lt;/a&gt;&lt;/li&gt;
     &lt;li&gt;&lt;a href="download.php"&gt;DOWNLOAD&lt;/a&gt;&lt;/li&gt;
     &lt;li&gt;&lt;a href="contact.php"&gt;CONTACT&lt;/a&gt;&lt;/li&gt;
      &lt;?php
          if(isset($_SESSION['user_id']) === true){
          ?&gt;&lt;li&gt;&lt;a href="logout.php"&gt;LOGOUT&lt;/a&gt;&lt;/li&gt;&lt;?php
       }else{
          ?&gt;&lt;li&gt;&lt;a href="login.php"&gt;LOGIN&lt;/a&gt;&lt;/li&gt;&lt;?php
       }
       ?&gt;
    &lt;/ul&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
  </code></pre>
  
  <p>what should i do? </p>