-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.php
47 lines (44 loc) · 924 Bytes
/
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
<?php
include("include.php");
if($_POST)
if($db->loginUser($_POST['password'],$_POST['username'])){
$_SESSION['LOGGED_IN']=true;
$notice="Login Successful";
header("location:".@$_SESSION['url']);
}else{
$_SESSION['LOGGED_IN']=false;
$notice="Invalid Username or Password";
}
?>
<!DOCTYPE html>
<head>
<title>Login</title>
<style>
fieldset p{
text-align:center;
color:grey;
}
#container{
width:400px;
margin:50px auto 0px auto;
}
</style>
</head>
<body>
<div id="container">
<form method="POST" action="">
<fieldset>
<legend>Login</legend>
<div id="notice"><?php echo @$notice ?></div>
<label for="username">Username</label>
<input type="text" name="username" />
<br>
<label for="username">Password</label>
<input type="password" name="password" />
<input type="submit" value="Login" />
</fieldset>
</form>
<a href='register'>[Register]</a>
</div>
</body>
</html>