Merge branch 'main' of https://git-eng.ukwms.ac.id/2526-web/Kelompok02-Memory-Card
This commit is contained in:
commit
93511c347a
8
auth.php
8
auth.php
@ -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();
|
||||
}
|
||||
|
||||
/* =====================================================
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user