-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.php
51 lines (44 loc) · 1018 Bytes
/
login.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
$title = "Login - ";
$message = "";
require_once("partials/header.php");
if(isset($_SESSION['user'])) {
header("Location: index.php");
}
if(isset($_POST['submit'])) {
$login = loginUser($_POST);
if(isset($login['message'])) {
$message = $login['message'];
} else {
header("Location: index.php");
}
}
?>
<center>
<h1>Login User</h1>
</center>
<form action="" method="post">
<fieldset>
<legend>Login Form:</legend>
<?php if($message != "") {
echo "<font color=\"red\">".$message."</font>";
}
?>
<div>
<label>Username</label> <br />
<input type="text" placeholder="Username" name="username">
</div>
<br/>
<div>
<label>Password</label> <br />
<input type="password" placeholder="Password" name="password">
</div>
<br/>
<button type="submit" name="submit">Login</button> |
<a href="forgot.php">Lupa Password</a> |
<a href="register.php">Register</a> |
<a href="index.php">Halaman Utama</a>
</fieldset>
</form>
<?php
require_once("partials/footer.php");