first
This commit is contained in:
86
legacy_source/login.php
Normal file
86
legacy_source/login.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
if(isset($_POST['login'])){
|
||||
|
||||
$username = $_POST['username'];
|
||||
$password = $_POST['password'];
|
||||
|
||||
// USER LOGIN SIMPLE
|
||||
if($username == "cukai" && $password == "123"){
|
||||
|
||||
$_SESSION['login'] = true;
|
||||
|
||||
header("Location: pilih_table.php");
|
||||
exit();
|
||||
|
||||
}else{
|
||||
$error = "Login gagal";
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Login</title>
|
||||
|
||||
<style>
|
||||
|
||||
body{
|
||||
font-family:Arial;
|
||||
background:#f0f0f0;
|
||||
}
|
||||
|
||||
.login-box{
|
||||
width:350px;
|
||||
background:white;
|
||||
margin:100px auto;
|
||||
padding:30px;
|
||||
border-radius:10px;
|
||||
}
|
||||
|
||||
input{
|
||||
width:100%;
|
||||
padding:10px;
|
||||
margin-bottom:15px;
|
||||
}
|
||||
|
||||
button{
|
||||
width:100%;
|
||||
padding:10px;
|
||||
background:#333;
|
||||
color:white;
|
||||
border:none;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="login-box">
|
||||
|
||||
<h2>LOGIN</h2>
|
||||
|
||||
<?php
|
||||
if(isset($error)){
|
||||
echo $error;
|
||||
}
|
||||
?>
|
||||
|
||||
<form method="POST">
|
||||
|
||||
<input type="text" name="username" placeholder="Username" required>
|
||||
|
||||
<input type="password" name="password" placeholder="Password" required>
|
||||
|
||||
<button type="submit" name="login">LOGIN</button>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user