From 8dbcf41f49543cacfffe2dd51fa6d1396d878acd Mon Sep 17 00:00:00 2001 From: alvin Date: Thu, 11 Dec 2025 11:15:13 +0700 Subject: [PATCH] tampilan web awal --- index.php | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 index.php diff --git a/index.php b/index.php new file mode 100644 index 0000000..b02ef56 --- /dev/null +++ b/index.php @@ -0,0 +1,50 @@ +prepare('SELECT id, password FROM users WHERE username = ? LIMIT 1'); +$stmt->execute([$username]); +$user = $stmt->fetch(); +if ($user && password_verify($password, $user['password'])) { +session_regenerate_id(true); +$_SESSION['user_id'] = $user['id']; +$_SESSION['username'] = $username; +header('Location: menu.php'); +exit; +} else { +$err = 'Username atau password salah.'; + } + } +} +?> + + + + + +Login - Dam Inggris + + + +
+

Login - Ke Main Menu

+
+
+ + + +
+

Belum punya akun? Daftar di sini

+
+ + \ No newline at end of file