From 9629c32d928bab038dc8baac393e79da41c31321 Mon Sep 17 00:00:00 2001 From: naufalalam Date: Tue, 27 Apr 2021 20:42:58 +0700 Subject: [PATCH] Pengerjaan Final Login Admin ref #4 --- Library.id/actions/loginadmin.php | 26 ++++++++++ Library.id/loginadmin.php | 84 +++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 Library.id/actions/loginadmin.php create mode 100644 Library.id/loginadmin.php diff --git a/Library.id/actions/loginadmin.php b/Library.id/actions/loginadmin.php new file mode 100644 index 0000000..0ca5009 --- /dev/null +++ b/Library.id/actions/loginadmin.php @@ -0,0 +1,26 @@ +username = $_POST["username"]; +$login->password = $_POST["password"]; +$r = $login->login(); + +var_dump($r); + +if ($r != null) +{ + $_SESSION["id"] = $r["id"]; + $_SESSION["role"] = "admin"; + header("Location: ../homepage"); + exit; +} +else +{ + header("Location: ../loginadmin?err=1"); +} + +?> \ No newline at end of file diff --git a/Library.id/loginadmin.php b/Library.id/loginadmin.php new file mode 100644 index 0000000..1b7d9a9 --- /dev/null +++ b/Library.id/loginadmin.php @@ -0,0 +1,84 @@ + + Username atau password salah! + '; +} + +?> + + + + + + + + + + + + Login Admin - Library.id + + + + + + + + +
+
+
+
+
+ +
+

Login Admin


+
+ + +
+
+ + +
+
+ + +
+
+
+


belum punya akun? Registrasi

+

login user user

+
+
+
+
+
+
+
+ + + + + + + + \ No newline at end of file