This commit is contained in:
Nathan 2025-12-16 02:51:30 +07:00
commit 93511c347a

View File

@ -63,14 +63,18 @@ if (isset($_POST['btn-register'])) {
$insert->bind_param("sss", $username, $email, $hash);
if ($insert->execute()) {
// PERUBAHAN DISINI: Tambahkan ?success=register agar JS menampilkan pesan hijau
// TUTUP DISINI (Sebelum pindah halaman)
$insert->close();
header("Location: index.php?success=register");
exit;
} else {
// TUTUP DISINI JUGA (Sebelum pindah halaman)
$insert->close();
header("Location: index.php?register_error=Gagal mendaftar, coba lagi nanti.");
exit;
}
$insert->close();
}
/* =====================================================