-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
42 lines (37 loc) · 1.16 KB
/
index.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
<?php
session_start();
include("connection.php");
if(array_key_exists("signout",$_GET)){
session_destroy();
unset($_GET["signout"]);
}
if(array_key_exists("username",$_SESSION) && $_SESSION["username"]!="")
{
header("Location: logged.php");
}
include("login.php");
include("header.php");
?>
<div class="form container">
<form id="form" method="POST" >
<h1>Secret Diary</h1>
<input id="checker" type="hidden" name="log" value="login">
<div id="error"></div>
<div class="form-group">
<label for="email">Email address:</label>
<input type="email" class="form-control" placeholder="Enter email" id="email" name="email">
</div>
<div class="form-group">
<label for="pwd">Password:</label>
<input type="password" class="form-control" placeholder="Enter password" id="password" name="password">
</div>
<div class="form-group form-check">
<label class="form-check-label">
<span id="rememberme"> <input class="form-check-input" type="checkbox"> Remember me</span>
</label>
</div>
<button id="submit" type="submit" class="btn btn-primary">Login</button>
<a id="log" href="#">Register</a>
</form>
</div>
<?php include("footer.php"); ?>