-
Notifications
You must be signed in to change notification settings - Fork 0
/
testForm.php
40 lines (40 loc) · 1.35 KB
/
testForm.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 lang="en" >
<head>
<meta charset="UTF-8">
<title>Victim login page</title>
</head>
<body>
<center>
<h1 style="font-size:120px;">Victim login page</h1>
<style>
input[type='text'] { font-size: 24px; }
input[type='password'] { font-size: 24px; }
input[type='submit'] { font-size: 24px; }
</style>
<form action="" method="POST">
<label type="text" for="username">Username:</label>
<input type="text" id="username" name="username">
<br><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password">
<br><br>
<input type="submit" name="Log In" value="Log In">
</form>
<?php
// Validation
$_user = "TestUser";
$_password = "daniel";
// ^ You can change these.
if(isset($_REQUEST['username']) && isset($_REQUEST['password'])){
echo "<br>";
if($_REQUEST['username'] == $_user && $_REQUEST['password'] == $_password){
echo "<b style='color:green;font-size:24px;'>Good credentials</b>";
}else{
echo "<b style='color:red;font-size:24px;'>Wrong crendentials</b>";
}
}
?>
</center>
</body>
</html>