-
Notifications
You must be signed in to change notification settings - Fork 1
/
login.php
67 lines (64 loc) · 3.38 KB
/
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
$title = "Log In";
include "includes/components/header.php" ?>
<?php include "includes/components/navbar.php" ?>
<section class="pt-5 pb-5 mt-0 align-items-center d-flex bg-dark" style="min-height: 100vh; background-size: cover; background-repeat: no-repeat; background-image: url('images/resources/log-in.png');">
<div class="container-fluid">
<div class="row justify-content-center align-items-center d-flex-row text-center h-100">
<div class="col-12 col-md-4 col-lg-3 h-50 ">
<div class="card shadow">
<div class="card-body mx-auto">
<br>
<br>
<h2 class="card-title mt-3 text-center"><strong>Login</strong></h2>
<br>
<br>
<form action="login.php" method="POST">
<div class="form-group input-group">
<div class="input-group-prepend">
<span class="input-group-text"> <i class="fa fa-envelope"></i> </span>
</div>
<input name="username" class="form-control" placeholder="Enter username" type="text" required>
<div class="invalid-feedback" style="width: 100%;">
Your username is required.
</div>
</div>
<div class="form-group input-group">
<div class="input-group-prepend">
<span class="input-group-text"> <i class="fa fa-lock"></i> </span>
</div>
<input name="password" class="form-control" placeholder="Enter password" type="password" required>
<div class="invalid-feedback" style="width: 100%;">
Your password is required.
</div>
</div>
<br>
<br>
<div class="form-group">
<button style="background-color: #43DBAD;border:none;border-radius:30px;font-size:1.2rem;padding:10px;" name="login" type="submit" class="btn btn-primary btn-block"> <strong>Log In</strong> </button>
</div>
<br>
<br>
<br>
<p class="text-center">Don't have an account?
<br>
<a href="signup.php">Sign Up</a>
</p>
<?php
if (isset($_POST["login"])) {
$username = $_POST['username'];
$password = $_POST['password'];
loginUser($username, $password);
}
?>
<br>
<br>
<br>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
<?php include "includes/components/footer.php" ?>