Compare commits

..

No commits in common. "1d536b42f5ac1491649dfb0a6d5764f973650f84" and "91ea5d8bb3034031db258a0e39ca54d12635417e" have entirely different histories.

View File

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