title: Change navbar in bootstrap if user login
body: <p>I have a standard menu, including an option for "logging" in and "create user". What I want is that when either you create a user or you loging  the whole navbar menu to change, say, "My user's page" and "logout" instead, how can I do it? </p>
  
  <pre><code>&lt;div id="menu"&gt;
      &lt;nav class="navbar"&gt;
          &lt;div class="container"&gt;
              &lt;ul class="nav navbar-nav"&gt;
                  &lt;li class="active"&gt;&lt;a href="#"&gt;&lt;span class="glyphicon glyphicon-home"&gt;  &lt;/span&gt;    Home&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#"&gt;Descuentos&lt;/a&gt;&lt;/li&gt;
                  &lt;li class="dropdown"&gt;
                      &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown"&gt;Categories&lt;span class="caret"/&gt;&lt;/a&gt;
                      &lt;ul class="dropdown-menu"&gt;
                          &lt;li&gt;&lt;a href="#"&gt;Cat A&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a href="#" &gt;Cat B&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a href="#"&gt;Cat C&lt;/a&gt;&lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
              &lt;ul class="nav navbar-nav navbar-right"&gt;
                  &lt;li&gt;&lt;a href="createaccount.php"&gt;&lt;span class="glyphicon glyphicon-user"&gt;&lt;/span&gt;Create account&lt;/a&gt;&lt;/li&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-log-in"&gt;&lt;/span&gt;  Login&lt;/a&gt;
                      &lt;ul class="dropdown-menu" role="menu"&gt;
                          &lt;li&gt;
                              &lt;form class="form-horizontal" role="form" action="tienda.php"  method="POST"&gt;
                                  &lt;div class="form-group"&gt;
                                      &lt;label class="control-label col-md-4" for="nombre"&gt;User:&lt;/label&gt;
                                      &lt;div class="col-md-8"&gt;
                                          &lt;input type="text" class="form-control" name="loginUser" required&gt;
                                      &lt;/div&gt;
                                      &lt;label class="control-label col-md-4" for="nombre"&gt;Pass:&lt;/label&gt;
                                      &lt;div class="col-md-8"&gt;
                                          &lt;input type="password" class="form-control" name="loginPass" required&gt; &lt;br&gt;
                                      &lt;/div&gt;
                                      &lt;div class="col-md-5"&gt;&lt;/div&gt;
                                      &lt;button type="submit" class="btn btn-default col-md-5"&gt;Log In&lt;/button&gt;
                                  &lt;/div&gt;
                              &lt;/form&gt;
                          &lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/nav&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Basically, change </p>
  
  <pre><code>&lt;ul class="nav navbar-nav navbar-right"&gt;
                      &lt;li&gt;&lt;a href="createaccount.php"&gt;&lt;span class="glyphicon glyphicon-user"&gt;&lt;/span&gt;Create account&lt;/a&gt;&lt;/li&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-log-in"&gt;&lt;/span&gt;  Login&lt;/a&gt;
                          &lt;ul class="dropdown-menu" role="menu"&gt;
                              &lt;li&gt;
                                  &lt;form class="form-horizontal" role="form" action="tienda.php"  method="POST"&gt;
                                      &lt;div class="form-group"&gt;
                                          &lt;label class="control-label col-md-4" for="nombre"&gt;User:&lt;/label&gt;
                                          &lt;div class="col-md-8"&gt;
                                              &lt;input type="text" class="form-control" name="loginUser" required&gt;
                                          &lt;/div&gt;
                                          &lt;label class="control-label col-md-4" for="nombre"&gt;Pass:&lt;/label&gt;
                                          &lt;div class="col-md-8"&gt;
                                              &lt;input type="password" class="form-control" name="loginPass" required&gt; &lt;br&gt;
                                          &lt;/div&gt;
                                          &lt;div class="col-md-5"&gt;&lt;/div&gt;
                                          &lt;button type="submit" class="btn btn-default col-md-5"&gt;Log In&lt;/button&gt;
                                      &lt;/div&gt;
                                  &lt;/form&gt;
                              &lt;/li&gt;
                          &lt;/ul&gt;
                      &lt;/li&gt;
                  &lt;/ul&gt;
  </code></pre>
  
  <p>to this:</p>
  
  <pre><code>&lt;ul class="nav navbar-nav navbar-right"&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;Nombre USUARIO&lt;/a&gt;
  
                      &lt;ul class="dropdown-menu" role="menu"&gt;
                              &lt;li&gt;&lt;a href="#"&gt;Mi página&lt;/a&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;a href="#"&gt;&lt;span class="glyphicon glyphicon-shopping-cart"&gt;&lt;/span&gt;  Carrito&lt;/a&gt;&lt;/li&gt;
                          &lt;/ul&gt;
                      &lt;/li&gt;
  
  
                      &lt;li&gt;&lt;a href="#"&gt;&lt;span class="glyphicon glyphicon-log-out"&gt;&lt;/span&gt;  Logout&lt;/a&gt;&lt;/li&gt;
  
                  &lt;/ul&gt;
  </code></pre>
  
  <p>What's the best way to do this?</p>