merge from notif to dev #6
@ -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();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user