-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
93 lines (48 loc) · 1.49 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
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
85
86
87
88
89
90
91
92
93
<?php session_start();?>
<!DOCTYPE html>
<html>
<head>
<title>PHP Simple Chat System using AJAX</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/style.css">
<style>
#login_form{
width:350px;
height:350px;
position:relative;
top:50px;
margin: auto;
padding: auto;
}
</style>
</head>
<body>
<div class="container">
<div id="login_form" class="well">
<h2><center><span class="glyphicon glyphicon-lock"></span> Please Login</center></h2>
<hr>
<form method="POST" action="login.php">
Username: <input type="text" name="username" class="form-control" required>
<div style="height: 10px;"></div>
Password: <input type="password" name="password" class="form-control" required>
<div style="height: 10px;"></div>
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-log-in"></span> Login</button> No account? <a href="signup.php"> Sign up</a>
</form>
<div style="height: 15px;"></div>
<div style="color: red; font-size: 15px;">
<center>
<?php
if(isset($_SESSION['msg'])){
echo $_SESSION['msg'];
unset($_SESSION['msg']);
}
include "conn.php";
?>
</center>
</div>
</div>
</div>
</body>
</html>