1<form method="post" action="">
2 <span>Select languages</span><br/>
3 <input type="checkbox" name='lang[]' value="PHP"> PHP <br/>
4 <input type="checkbox" name='lang[]' value="JavaScript"> JavaScript <br/>
5 <input type="checkbox" name='lang[]' value="jQuery"> jQuery <br/>
6 <input type="checkbox" name='lang[]' value="Angular JS"> Angular JS <br/>
7
8 <input type="submit" value="Submit" name="submit">
9</form>
10
11<?php
12if(isset($_POST['submit'])){
13
14 if(!empty($_POST['lang'])) {
15
16 foreach($_POST['lang'] as $value){
17 echo "value : ".$value.'<br/>';
18 }
19
20 }
21
22}
23?>
1<span>Select languages</span><br/>
2<input type="checkbox" name='lang[]' value="PHP"> PHP <br/>
3<input type="checkbox" name='lang[]' value="JavaScript"> JavaScript <br/>
4<input type="checkbox" name='lang[]' value="jQuery"> jQuery <br/>
5<input type="checkbox" name='lang[]' value="Angular JS"> Angular JS <br/>