title: Bootstrap Dropdown Menu Not Working?
body: <p>Hello I am created a new bootstrap website and for some reason the dropdown menu will not work correctly. When I click it, it does nothing.</p>
  
  <p>Below is the code I have in my index.php file body:</p>
  
  <pre><code>&lt;nav class="navbar navbar-default" role="navigation"&gt;
   &lt;div class="container-fluid"&gt;
      &lt;div class="navbar-header"&gt;
  
          &lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar1"&gt;
  
              &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt;
  
              &lt;span class="icon-bar"&gt;&lt;/span&gt;
  
              &lt;span class="icon-bar"&gt;&lt;/span&gt;
  
              &lt;span class="icon-bar"&gt;&lt;/span&gt;
  
          &lt;/button&gt;
  
          &lt;a class="navbar-brand" href="index.php"&gt;CookieCodec&lt;/a&gt;
  
      &lt;/div&gt;
  
      &lt;div class="collapse navbar-collapse" id="navbar1"&gt;
  
          &lt;ul class="nav navbar-nav navbar-right"&gt;
  
              &lt;?php if (isset($_SESSION['usr_id'])) { ?&gt;
      &lt;li class="dropdown"&gt;
                  &lt;a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false" href="#"&gt;&lt;span class="glyphicon glyphicon-user"&gt;&lt;/span&gt; Signed in as &lt;?php echo $_SESSION['usr_name']; ?&gt;&lt;/a&gt;
  
                  &lt;ul class="dropdown-menu" role="menu"&gt;
              &lt;li&gt;&lt;a href="#"&gt;My Profile&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;Upload&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;Account&lt;/a&gt;&lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/li&gt;
  
  
                  &lt;li&gt;&lt;a href="logout.php"&gt;&lt;span class="glyphicon glyphicon-log-out"&gt;&lt;/span&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;li&gt;&lt;a href="register.php"&gt;Sign Up&lt;/a&gt;&lt;/li&gt;
  
              &lt;?php } ?&gt;
  
         &lt;/ul&gt;
      &lt;/div&gt;
    &lt;/div&gt;
   &lt;/nav&gt;
  </code></pre>
  
  <p>Does anyone know why it will not work? Am I missing something?</p>