-
Notifications
You must be signed in to change notification settings - Fork 0
/
o.php
59 lines (44 loc) · 994 Bytes
/
o.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
<?php
// Note that this header is required to disable xss filters in modern web browsers
header("X-XSS-Protection: 0");
if (isset($_GET['submit']))
{require_once('clean.php');
$string = clean($_GET['comment']);
$_GET['comment']=$string;
$string = clean($_GET['name']);
$_GET['name']=$string;
$string = clean($_GET['submit']);
$_GET['submit']=$string;
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Test 1 Comment</title>
</head>
<body>
<h1>Thanks for your comment <?php echo $_GET['name'] ?></h1>
<p><?php print("<em>Your comment</em>: ${_GET['comment']}"); ?></p>
</body>
</html>
<?php
}
else {
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Test 1</title>
</head>
<body>
<h1>Hello!</h1>
<p>Share your views with us:</p>
<form>
Name: <input name="name" type="text"><br>
Comment: <textarea name="comment"></textarea><br>
<input name="submit" type="submit">
</form>
</body>
</html>
<?php } ?>