-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetvalue1.php
More file actions
64 lines (54 loc) · 1.47 KB
/
getvalue1.php
File metadata and controls
64 lines (54 loc) · 1.47 KB
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
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<h3>For single Selection:</h3>
<form action="" method="post">
<input type="checkbox" name="check[]" value="Apple" />Apple
<input type="checkbox" name="check[]" value="Banana" />Banana
<input type="checkbox" name="check[]" value="Juice" />Juice
<input type="checkbox" name="check[]" value="Mango" />Mango
<input type="checkbox" name="check[]" value="Jackfruit" />Jackfruit
<input type="checkbox" name="check[]" value="Others" />Others
<input type="submit" name="submit" value="Check Now" />
</form>
<form action="" method="post">
<input type="radio" name="check[]" value="Apple" />Apple
<input type="radio" name="check[]" value="Banana" />Banana
<input type="radio" name="check[]" value="Juice" />Juice
<input type="radio" name="check[]" value="Mango" />Mango
<input type="radio" name="check[]" value="Jackfruit" />Jackfruit
<input type="radio" name="check[]" value="Others" />Others
<input type="submit" name="sub" value="Check Now" />
</form>
<?php
if(isset($_POST['submit']))
{
if(!empty($_POST['check']))
{
echo"You have selected: <br />";
foreach($_POST['check'] as $selected)
{
echo$selected."<br />";
}
}
}
?>
<?php
if(isset($_POST['sub']))
{
if(!empty($_POST['check']))
{
echo"You have selected: <br />";
foreach($_POST['check'] as $selected)
{
echo$selected."<br />";
}
}
}
?>
</body>
</html>