 <nav class="navbar navbar-expand navbar-dark bg-primary sticky-top">
   <div class="container-lg">
     <a class="navbar-brand" href="."><i class="bi bi-shop"></i> Cake Shop Bang Blake</a>

     <div class="collapse navbar-collapse justify-content-end" id="navbarNavDropdown">
       <ul class="navbar-nav">
         <li class="nav-item dropdown">
           <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
             <?php echo $hasil['username']; ?>
           </a>
           <!-- bagian username kanan atas -->
           <ul class="dropdown-menu dropdown-menu-end mt-2">
             <li>
               <a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#ModalUbahPassword">
                 <i class="bi bi-key"></i> Ubah Password
               </a>
             </li>
             <li><a class="dropdown-item" href="logout"><i class="bi bi-box-arrow-right"></i> Logout</a></li>
             <!-- End -->
           </ul>
         </li>
       </ul>
     </div>
   </div>
 </nav>

 <!-- Modal Ubah Password -->
 <div class="modal fade" id="ModalUbahPassword" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
   <div class="modal-dialog modal-xl">
     <div class="modal-content">
       <div class="modal-header">
         <h1 class="modal-title fs-5" id="exampleModalLabel">Ubah Password</h1>
         <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
       </div>
       <div class="modal-body">
         <form class="needs-validation" novalidate action="proses/proses_ubah_password.php" method="POST">
           <div class="row">
             <div class="col-lg-6">
               <div class="form-floating mb-3">
                 <input type="email" class="form-control" id="inputUsername" value="<?php echo $_SESSION['username_bangblake'] ?>" disabled>
                 <input type="hidden" name="username" value="<?php echo $_SESSION['username_bangblake'] ?>">
                 <label for="inputUsername">Username</label>
                 <div class="invalid-feedback">
                   Masukkan Username
                 </div>
               </div>
             </div>

             <div class="col-lg-6">
               <div class="form-floating mb-3">
                 <!-- PERBAIKAN: Tambahkan name="passwordlama" -->
                 <input type="password" class="form-control" id="inputPasswordLama" name="passwordlama" required>
                 <label for="inputPasswordLama">Password Lama</label>
                 <div class="invalid-feedback">
                   Masukkan Password Lama.
                 </div>
               </div>
             </div>
           </div>

           <div class="row">
             <div class="col-lg-6">
               <div class="form-floating mb-3">
                 <input type="password" class="form-control" id="inputPasswordBaru" name="passwordbaru" required>
                 <label for="inputPasswordBaru">Password Baru</label>
                 <div class="invalid-feedback">
                   Masukkan Password Baru
                 </div>
               </div>
             </div>

             <div class="col-lg-6">
               <div class="form-floating mb-3">
                 <input type="password" class="form-control" id="inputRePasswordBaru" name="repasswordbaru" required>
                 <label for="inputRePasswordBaru">Ulangi Password Baru</label>
                 <div class="invalid-feedback">
                   Ulangi Password Baru.
                 </div>
               </div>
             </div>
           </div>

           <div class="modal-footer">
             <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
             <button type="submit" class="btn btn-primary" name="ubah_password_validate" value="12345">Save changes</button>
           </div>
         </form>
       </div>
     </div>
   </div>
 </div>
 <!--Akhir Modal ubah password-->