title: The checkbox's do not hold all value when I select more then one checked
body: <p>I want insert employee attendance. when I checked more then one checkbox it take two checkbox value 1 and other checkbox value 0 .so how can i solve this please help me. this is my form code</p>
  
  <pre><code>&lt;form action="coll.php" method="post" name="create_grading" id="create_grading"&gt;  
          &lt;table width="30%" border="0" cellpadding="2" cellspacing="3" class="mainTable"&gt;
              &lt;tr&gt;
                  &lt;th&gt;&lt;input type="checkbox" id="selectall" /&gt;&lt;/th&gt;
                  &lt;th&gt;name&lt;/th&gt;
              &lt;/tr&gt;
              &lt;?php
              $sql = "select * from employee";
              $query = mysqli_query($con, $sql);
              while ($row = mysqli_fetch_array($query)) {
                  ?&gt;   
                  &lt;tr&gt;
                      &lt;td&gt;&lt;input type="hidden" name="eid[]" value="&lt;?php echo $row['eid']; ?&gt;"/&gt;
                          &lt;input name="status[]" class="case" type="checkbox" value="1" /&gt;&lt;input name="status[]" class="case" type="hidden" value="0" /&gt;&lt;/td&gt;
                      &lt;td align="center"&gt;&lt;?php echo $row['employee_name'] ?&gt;&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;?php }; ?&gt;
  
              &lt;tr&gt;
                  &lt;td&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;input type="submit" name="Submit" id="Submit" value="Submit" /&gt;&lt;/td&gt;       
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p><strong>this is my insert code</strong></p>
  
  <pre><code>$host = "localhost";
  $user = "root";
  $pass = "";
  $db = "multiple_row_insert";
  $con = mysqli_connect($host, $user, $pass, $db);
  
  
  if (isset($_POST['Submit'])) {
      $eid = $_POST['eid'];
      $count = count($eid);
      for ($i = 0; $i &lt; $count; $i++) {
          $status = $_POST['status'][$i];
          $eid2 = $_POST['eid'][$i];
          $query = "INSERT INTO time(eid,status) VALUES ('$eid2','$status')";
          $query = mysqli_query($con, $query);
      }
  }
  </code></pre>