-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex_GET.php
executable file
·40 lines (39 loc) · 1.24 KB
/
index_GET.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
<!DOCTYPE HTML>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
.login {
height:180px;
width:230px;
margin:0;
border:1px #CCC solid;
padding:10px;
}
.login input {
padding:5px;
margin:5px
}
</style>
<body>
<?php
if ($_SERVER["REQUEST_METHOD"] == "GET") {
$username = $_GET["username"];
$password = $_GET["password"];
if ($username == "admin" && $password == "admin") {
echo "<h2>Welcome <span style='color:red'>" .$username. "</span> to website</h2>";
}
else{
echo "<h2><span style='color:red'>Login Error</span></h2>";
}
}
?>
<form method="get">
<div class="login">
<h2>Login</h2>
<input type="text" name="username" size="30" placeholder="username" />
<input type="password" name="password" size="30" placeholder="password" />
<input type="submit" value="#"/>
</div>
</form>
</body>
</html>