-
Notifications
You must be signed in to change notification settings - Fork 1
/
login.php
105 lines (76 loc) · 2.45 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<meta charset="UTF-8">
<title>Login Form </title>
<style>
h1{ color:#2D2901;
font-size:200%;
letter-spacing:2px;
}
h6 {
color: blue
}
ul li {
display:inline;
/*word-spacing:50px;*/
margin-right:4em;
top:200px;
padding:1px 1px 1px 1px;
text-decoration:none;
}
span{
color:crimson;
font-size:medium;
}
ul li a {
text-decoration:none;
list-style:none;
letter-spacing:1px;
color:red;
/*display:block;*/
}
</style>
</head>
<body>
<?php
include './menu.inc.php';
?>
<h1>Login Form</h1>
<p>Please fill in all fields and click login.</p>
<!-- post form data to form.php -->
<form method = "post" action = "authenticate.php">
<h2>Enter Login Information</h2>
<!-- <div><label>Email:</label>
<input type = "email" name = "ename" placeholder = "name@domain.com" required></div>-->
<div><label>User Name:</label>
<input type = "text" name = "uname" required ></div>
<div><label>Password:</label>
<input type = "password" name = "pass" required ></div>
<p><input type = "submit" name = "submit" value = "Login"></p>
</form>
</body>
<?php
// $_GET['blog_id'];
//
if ($_SERVER["REQUEST_METHOD"] == "GET") {
if (isset($_GET['error'])) {
$error = $_GET['error'];
$sign1 = '<span style="color: red;">Invalid username/password combination</span>';
$sign2 = '<span style="color: red;">Please enter your username and password</span>';
if ($error == 1)
print($sign1);
header("refresh:1;url=login.php");
if ($error == 2)
print($sign2);
header("refresh:1;url=login.php");
}
}
// put your code here
?>
</html>