I have two checkboxes in my page. The data for both checkboxes are driven from database. No i am trying to get the value of each checkbox but it displays on. here is my script 

```
<?php include('conn.php'); ?>
<!doctype html>
<html><head>
<meta charset="utf-8">
<title>New Page</title>
<style type="text/css">
#div{
    height:500px; width:150px;  overflow:auto;
    border:thin;
    float:left;
}
#div2{
    height:auto;
    width:150px;
    overflow:auto;
    border:thin;
}
</style>
</head>

<body>
<form name="" action="2nd.php" method="post"> 
<div style="border:1; border-color:#006;">
<?php 
$sql=$connection->query("SELECT * FROM provinces");
echo "<div id=\"div\">"; 
while($result=$sql->fetch_assoc()){
    //echo "<input type=\"checkbox\" name=\""; echo $result['name'];  echo" \" "; echo $result['name']; echo" />"; 
    echo "
<input type=\"checkbox\" name=\"check[]\" value\""; echo $result['name']; echo" \" />"; 
echo $result['name']; 
echo "<br/>";
}
echo "</div>";
?>
<?php 
$sql=$connection->query("SELECT * FROM commodities");
echo "<div id=\"div2\">"; 
while($result=$sql->fetch_assoc()){
    //echo "<input type=\"checkbox\" name=\""; echo $result['name'];  echo" \" "; echo $result['name']; echo" />"; 
    echo "
<input type=\"checkbox\" name=\"check[]\" value\""; echo $result['name']; echo" \" />"; 
echo $result['name']; 
echo "<br/>";
}
echo "</div>";

?>
<input type="submit" name="save"/>
</div>
</form>
</body></html>

```

This code handles what comes from 1st page but it display on on.

```
<?php
$check=$_REQUEST['check'];
 foreach($check as $instrument)
{
    echo $instrument.'<br>';
}
?>

```