<?php
require '../config.php';
session_start();

$id = $_POST['id'];
$nama = htmlspecialchars($_POST['nama']);
$email = htmlspecialchars($_POST['email']);
$jk = $_POST['jenis_kelamin'];
$telp = $_POST['no_telp'];

mysqli_query($conn, "UPDATE pengguna SET 
  nama = '$nama',
  email = '$email',
  jenis_kelamin = '$jk',
  no_telp = '$telp'
  WHERE id = $id");

echo "<script>alert('Profil berhasil diperbarui.'); window.location='../admin/profile.php';</script>";
