diff --git a/src/app/components/profile/index.php b/src/app/components/profile/index.php
index 1b8a948ffabf7546a006e29876a843562db5f027..ddc54252e34acbea2485c523a380b87641deeec9 100644
--- a/src/app/components/profile/index.php
+++ b/src/app/components/profile/index.php
@@ -14,34 +14,12 @@
         $result = $mysqli->query($sql);
         $user = $result->fetch_assoc();
     }
-
-    // Fungsi untuk menghapus akun
-    function deleteAccount() {
+    if (isset($_POST['update_profile'])) {
         $servername = "db";
         $username = "php_docker";
         $password = "password";
         $dbname = "php_docker";
         $conn = mysqli_connect($servername, $username, $password, $dbname);
-
-        if (!$conn) {
-            die("Koneksi ke database gagal: " . mysqli_connect_error());
-        }
-
-        $user_id = $_SESSION["user_id"];
-
-        $deleteUserQuery = "DELETE FROM user WHERE user_id = '$user_id'";
-        if (mysqli_query($conn, $deleteUserQuery)) {
-            
-            session_destroy();
-            header("Location: /?login");
-            exit;
-        } else {
-            echo "Error: " . mysqli_error($conn);
-        }
-    }
-
-    if (isset($_POST['update_profile'])) {
-        $conn = mysqli_connect($servername, $username, $password, $dbname);
         if (!$conn) {
             die("Koneksi ke database gagal: " . mysqli_connect_error());
         }
@@ -63,19 +41,20 @@
             $newPhone = mysqli_real_escape_string($conn, $_POST['user_phone']);
         }
         
-
+   
+        // Validasi input sesuai kebutuhan Anda
+    
+        // Update data pengguna di database
         $updateQuery = "UPDATE user SET user_name = '$newName', user_email = '$newEmail', user_phone = '$newPhone' WHERE user_id = '$user_id'";
         if (mysqli_query($conn, $updateQuery)) {
+            // Redirect atau berikan pesan sukses, misalnya:
             header("Location: /?profile");
             exit;
         } else {
+            // Handle kesalahan jika gagal melakukan pembaruan
             echo "Error: " . mysqli_error($conn);
         }
     }
-
-    if (isset($_POST['delete_account'])) {
-        deleteAccount();
-    }
 ?>
 
 <!DOCTYPE html>
@@ -112,7 +91,7 @@
                 <input type="text" id="user_phone" name="user_phone" value="<?= $user["user_phone"] ?>" disabled>
                 <button class="edit-button" id="edit-phone-button" type="button">Edit</button>
                 </div>
-                <button type="submit" id="delete_account" name="delete_account">Delete Account</button>
+
                 <button type="submit" id="update_profile" name="update_profile" style="display: none;">Update</button>
 
             </form>
diff --git a/src/public/js/profile.js b/src/public/js/profile.js
index c750ac7e23ab1c47297cdc496a6afca10eb0315b..d1d8051a0861aa0717becb01186628ae1fa14348 100644
--- a/src/public/js/profile.js
+++ b/src/public/js/profile.js
@@ -39,49 +39,4 @@ document.addEventListener("DOMContentLoaded", function () {
             updateProfileButton.style.display = "block";
         }
     }
-    // profile.js
-
-// ...
-const deleteAccountButton = document.getElementById("delete_account_button");
-
-// Tambahkan event listener untuk tombol "Delete Account"
-deleteAccountButton.addEventListener("click", function () {
-    const confirmDelete = confirm("Anda yakin ingin menghapus akun Anda?");
-
-    if (confirmDelete) {
-        // Redirect atau lakukan penghapusan akun di sini
-
-        deleteAccount();
-    }
-});
-
-function deleteAccount() {
-    // Lakukan permintaan AJAX atau penghapusan akun ke server di sini
-    // Setelah berhasil menghapus akun, lakukan langkah-langkah berikut:
-
-    // 1. Hapus semua session
-    // 2. Lakukan logout
-    // 3. Redirect ke halaman lain (misalnya halaman login)
-    
-    // Contoh penghapusan semua session:
-    fetch("/logout.php", {
-        method: "POST",
-        headers: {
-            "Content-Type": "application/json",
-        },
-    })
-    .then(function(response) {
-        if (response.ok) {
-            // Logout berhasil, arahkan ke halaman login atau halaman lain
-            window.location.href = "/login.php"; // Ganti dengan halaman yang sesuai
-        } else {
-            // Handle kesalahan jika logout gagal
-            console.error("Gagal logout");
-        }
-    })
-    .catch(function(error) {
-        console.error("Terjadi kesalahan:", error);
-    });
-}
-
 });