title: How do i change the navigation bar from Login to the Username after the user logged in?
body: <p>here is my navigation bar, and i want the navigation Bar to change from Login to the username of the user immediately after the user logged in. please how do i do it?</p>
  
  <pre><code>&lt;div id="NavBar"&gt;
          &lt;nav&gt;
          &lt;ul&gt;
              &lt;li&gt;&lt;a href="Home.php"&gt;Home&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;
              &lt;?php
                  if(isset($_SESSION['Username'])){
  
                      echo $_SESSION['Username'];
                  }
                  else{
                      echo &lt;li&gt;&lt;a href="Login2.php"&gt;Login&lt;/a&gt;&lt;/li&gt;        
                  }
  
                  ?&gt;
             &lt;/li&gt;
              &lt;li&gt;&lt;a href="Candidate Profile.php"&gt;Candidates Profile&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="Admin.php"&gt;Admin&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/nav&gt;
      &lt;/div&gt;
  </code></pre>