style: final style notif

This commit is contained in:
Matthew Florentino 2025-11-26 11:01:10 +07:00
parent 2dd889153b
commit e848cb31fc
2 changed files with 11 additions and 10 deletions

View File

@ -8,7 +8,7 @@ if(isset($_POST['login'])){
$password = $_POST['password']; $password = $_POST['password'];
if(empty($username)||empty($password)){ if(empty($username)||empty($password)){
$msg = "data harus diisi!"; $msg = "Data Harus Lengkap !";
echo "<script>showNotif(" . json_encode($msg) . ");</script>"; echo "<script>showNotif(" . json_encode($msg) . ");</script>";
}else{ }else{
$sql = "SELECT * FROM users WHERE username =?"; $sql = "SELECT * FROM users WHERE username =?";
@ -23,14 +23,15 @@ if(isset($_POST['login'])){
$_SESSION['loggedin']='true'; $_SESSION['loggedin']='true';
$_SESSION['username']=$user['username']; $_SESSION['username']=$user['username'];
$_SESSION['id']=$user['id']; $_SESSION['id']=$user['id'];
header("location:leaderboard.php"); header("location:onboard.php");
exit(); exit();
}else{ }else{
$msg = "Password Salah!"; $msg = "Password Salah !";
echo "<script>showNotif(" . json_encode($msg) . ");</script>"; echo "<script>showNotif(" . json_encode($msg) . ");</script>";
} }
}else{ }else{
echo "username salah"; $msg = "Username tidak ditemukan !";
echo "<script>showNotif(" . json_encode($msg) . ");</script>";
} }
$stmt->close(); $stmt->close();
} }

View File

@ -3,20 +3,20 @@
<style> <style>
.notif { .notif {
position: fixed; position: fixed;
top: 100px; top: 50px;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
background-color: #00000060; background-color: #b2db0e1c;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
text-align: center; text-align: center;
color: yellow; color: yellow;
padding: 12px 18px; padding: 12px 18px;
width: 500px; width: 300px;
height: 200px; height: 25px;
font-size: 30px; font-size: 20px;
border: 1px solid white; border: 1px solid yellow;
border-radius: 8px; border-radius: 8px;
opacity: 0; opacity: 0;
transition: .3s; transition: .3s;