Compare commits
2 Commits
91ea5d8bb3
...
1d536b42f5
| Author | SHA1 | Date | |
|---|---|---|---|
| 1d536b42f5 | |||
| 93511c347a |
8
auth.php
8
auth.php
@ -63,14 +63,18 @@ 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()) {
|
||||||
// PERUBAHAN DISINI: Tambahkan ?success=register agar JS menampilkan pesan hijau
|
// TUTUP DISINI (Sebelum pindah halaman)
|
||||||
|
$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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* =====================================================
|
/* =====================================================
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user