-
Notifications
You must be signed in to change notification settings - Fork 292
Expand file tree
/
Copy pathlogin.php
More file actions
40 lines (40 loc) · 1.26 KB
/
login.php
File metadata and controls
40 lines (40 loc) · 1.26 KB
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
<!DOCTYPE html>
<html lang="en">
<?php
session_start();
if($_SESSION["IsLogin"] == true)
header("Location: home.php");
?>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Đăng nhập</title>
</head>
<body>
<form method="POST" action="validateuser.php">
<div class="row mb-3">
<label for="inputUsername" class="col-sm-5 col-form-label">Tên đăng nhập:</label>
<div class="col-sm-7">
<input type="text" name="username" class="form-control" id="inputUsername" required>
</div>
</div>
<div class="row mb-3">
<label for="inputPassword" class="col-sm-5 col-form-label">Mật khẩu:</label>
<div class="col-sm-7">
<input type="password" name="password" class="form-control" id="inputPassword" required>
</div>
</div>
<div class="row">
<div class="col-sm-2"></div>
<div class="col-sm-5">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
</form>
<?php
if(isset($_GET['error'])) {
echo '<script>alert("' . $_GET['error'] . '");</script>';
}
?>
</body>
</html>