-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
97 lines (82 loc) · 2.38 KB
/
index.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
<!-- html css code from w3 school
php validator by crizan -->
<?php
session_start();
if (isset($_POST['submit'])) {
$Captcha = $_POST['captcha'];
if ($_SESSION['CODE'] == $Captcha) {
$FirstName = $_POST['firstname'];
$LastName = $_POST['lastname'];
$Country = $_POST['country'];
header("Location: redirectionpage.php?name=$FirstName");
exit();
}
else {
echo "Your captcha got wrong enter valid one ( Wow your code worked )";
}
} ?>
<!DOCTYPE html>
<html>
<style>
input[type=text],
select {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
.captcha {
width: 50% !important;
}
input[type=submit] {
width: 100%;
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type=submit]:hover {
background-color: #45a049;
}
div {
border-radius: 5px;
background-color: #f2f2f2;
padding: 20px;
}
label {
font-weight: bold;
}
img {
padding-top: 13px;
margin-bottom: -10px;
}
</style>
<body>
<h3>Criz Form</h3>
<div>
<form method="post">
<label for="fname">First Name</label>
<input type="text" id="fname" name="firstname" placeholder="Your name..">
<label for="lname">Last Name</label>
<input type="text" id="lname" name="lastname" placeholder="Your last name..">
<label for="country">Country</label>
<select id="country" name="country">
<option value="australia">Australia</option>
<option value="canada">Canada</option>
<option value="usa">USA</option>
</select>
<label for="lname">Captcha</label><br>
<img src="generator.php">
<input type="text" id="lname" name="captcha" class="captcha"
placeholder="Enter captcha as of above image..">
<input type="submit" name="submit" value="Submit">
</form>
</div>
</body>
</html>