From 2dd889153b9973d08358b03d9e4957d9606cc1f9 Mon Sep 17 00:00:00 2001 From: Matthew Florentino Date: Wed, 26 Nov 2025 10:48:57 +0700 Subject: [PATCH 1/2] feat: wait beacuse have bug at index.php --- src/index.php | 8 +++++-- src/{profile.php => js/main.js} | 0 src/notif.php | 40 +++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) rename src/{profile.php => js/main.js} (100%) create mode 100644 src/notif.php diff --git a/src/index.php b/src/index.php index 6fbaad9..afd1db7 100644 --- a/src/index.php +++ b/src/index.php @@ -1,13 +1,15 @@ showNotif(" . json_encode($msg) . ");"; }else{ $sql = "SELECT * FROM users WHERE username =?"; $stmt = $db -> prepare($sql); @@ -24,7 +26,8 @@ if(isset($_POST['login'])){ header("location:leaderboard.php"); exit(); }else{ - echo "password salah"; + $msg = "Password Salah!"; + echo ""; } }else{ echo "username salah"; @@ -56,6 +59,7 @@ $db->close();

don't have account yet? register now!

+
From e848cb31fcf2041facfbf4e06a3b595b50a53528 Mon Sep 17 00:00:00 2001 From: Matthew Florentino Date: Wed, 26 Nov 2025 11:01:10 +0700 Subject: [PATCH 2/2] style: final style notif --- src/index.php | 9 +++++---- src/notif.php | 12 ++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/index.php b/src/index.php index afd1db7..3407299 100644 --- a/src/index.php +++ b/src/index.php @@ -8,7 +8,7 @@ if(isset($_POST['login'])){ $password = $_POST['password']; if(empty($username)||empty($password)){ - $msg = "data harus diisi!"; + $msg = "Data Harus Lengkap !"; echo ""; }else{ $sql = "SELECT * FROM users WHERE username =?"; @@ -23,14 +23,15 @@ if(isset($_POST['login'])){ $_SESSION['loggedin']='true'; $_SESSION['username']=$user['username']; $_SESSION['id']=$user['id']; - header("location:leaderboard.php"); + header("location:onboard.php"); exit(); }else{ - $msg = "Password Salah!"; + $msg = "Password Salah !"; echo ""; } }else{ - echo "username salah"; + $msg = "Username tidak ditemukan !"; + echo ""; } $stmt->close(); } diff --git a/src/notif.php b/src/notif.php index 780c38f..68702cd 100644 --- a/src/notif.php +++ b/src/notif.php @@ -3,20 +3,20 @@