-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.php
52 lines (41 loc) · 1.07 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
<?php include('functions.php')?>
<?php
if (isLoggedIn()) {
header('location: index.php');
}
$name = "";
if(isset($_POST["login_btn"])){
$name = $_POST['username'];
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Online Chat System</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" href="media_query_for_phone/login.css">
</head>
<body id="login-body">
<div class="header">
<h2>Login</h2>
</div>
<form method="post" action="login.php">
<?php echo display_error(); ?>
<div class="input-group">
<label>Username</label>
<input type="text" name="username" autocomplete="off" value="<?php echo $name; ?>" >
</div>
<div class="input-group">
<label>Password</label>
<input type="password" name="password">
</div>
<div class="input-group">
<button type="submit" class="btn" name="login_btn">Login</button>
</div>
<p>
Not yet a member? <a href="register.php">Sign up</a>
</p>
</form>
</body>
</html>