-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.php
84 lines (74 loc) · 2.61 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
include_once('lib/header.php'); require('functions/alert.php');
?>
<title> Login | SNGH: Hospital of the Ignorant </title>
</head>
<body>
<?php
include_once('lib/menu.php');
?>
<?php
if(isset($_SESSION['logged_in'])) { ?>
<div class="error success content">
<h3> <?php echo $_SESSION['logged_in']; ?> </h3>
</div>
<?php } ?>
<div class="container">
<div class="row no-gutters">
<div class="col">
<img src="img/Screenshot (160).png" />
</div>
<div class="col-lg">
<div class="header">
<h2> Login </h2>
</div>
<div class="content">
<?php
//Check if Success message is available and print it out
message();
session_destroy();
?>
<p> Kindly login below </p>
</div>
<form method="POST" action="processlogin.php">
<?php
//Check if error message is available and print it out
error();
?>
<div class="input-group">
<p>
<label> Email </label>
<input
<?php
//Check if Email is available after error message (ie if initially inputed by user) and hold it in
if(isset($_SESSION['email'])){
echo "value=" . $_SESSION['email'];
}
?>
type="text" name="email" placeholder="Email" /> <br />
</p>
</div>
<div class="input-group">
<p>
<label> Password </label>
<input type="password" name="password" placeholder="Password" /> <br />
</p>
</div>
<p>
<button class="btn btn-success" type="submit"> Login </button>
</p>
<p>
New member? <a href ="register.php"> Sign Up </a>
</p>
<p>
<a href ="forgot.php"> Forgot Password </a>
</p>
</form>
</div>
</div>
</div>
<?php
include_once('lib/footer.php');
?>
</body>
</html>