-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
43 lines (43 loc) · 1.89 KB
/
index.php
File metadata and controls
43 lines (43 loc) · 1.89 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
41
42
43
<!DOCTYPE html>
<html>
<head>
<title>Login</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="index.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Baloo&display=swap" rel="stylesheet">
</head>
<body>
<?php
session_start();
if (isset($_SESSION["login_failed"]) && $_SESSION["login_failed"]) {
echo "<script>alert('Login failed. Please try again.');</script>";
$_SESSION["login_failed"] = false;
}
?>
<div class="container">
<div class="row justify-content-center mt-5">
<div class="col-md-6">
<div class="card">
<div class="card-body">
<h2 class="card-title">Login</h2>
<form action="login_process.php" method="POST">
<div class="mb-3">
<label for="username" class="form-label">Username:</label>
<input type="text" name="username" class="form-control" required>
</div>
<div class="mb-3">
<label for="password" class="form-label">Password:</label>
<input type="password" name="password" class="form-control" required>
</div>
<button type="submit" class="btn btn-primary">Login</button>
</form>
<p class="mt-3">Don't have an account? <a href="register.php">Register</a></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>