title: Checkbox to send only specific rows to php form parser
body: <p>I'm trying to use a form with php. </p>
  
  <p>I populate the form info from a database. </p>
  
  <p>The form input is separated into rows.</p>
  
  <p>The form offers a checkbox to only pass that row of data and what is supposed to happen is when I parse the data in the form parsing document I only get the rows that were checked. </p>
  
  <p>However what's happening is that the $_POST method for the checkbox array will only return what's checked, but all the other input arrays still contain all the rows, even the ones that aren't checked.</p>
  
  <pre><code>&lt;?php
  
  
  
  while($row = mysql_fetch_assoc($query)){
      $id = $row["id"];
          $email = $row["user_email"];
      $androidId = $row["user_androidid"];
      $amount = $row["amount"];
  
      echo "&lt;tr&gt;
      &lt;td&gt;&lt;input id='data_id' name='data_id[]' size='25'  value='".$id."'/&gt;&lt;/td&gt;
      &lt;td&gt;&lt;input id='mail' name='mail[]'size='25' value='".$email."'/&gt;&lt;/td&gt;
      &lt;td&gt;&lt;input id='androidId' name='androidId[]' size='25' value='".$androidId."'/&gt;&lt;/td&gt;
      &lt;td&gt;&lt;input id='amount' name='amount[]' size='25' value='".$amount."'/&gt;&lt;/td&gt;
      &lt;td&gt;coming soon...&lt;/td&gt;
      &lt;td&gt;&lt;input id='currency' name='currencyCode[]' size='25' value='USD'/&gt;&lt;/td&gt;
      &lt;td&gt;&lt;input type='checkbox' name='chosen[]' value='".$id."'&lt;td&gt;
      &lt;/tr&gt;";
  
  
  
  }
  ?&gt;
  </code></pre>
  
  <p>And I'm testing it like this: </p>
  
  <pre><code>for($i=0; $i&lt;count($_POST["chosen"]); $i++){
  
  echo $_POST["chosen"][$i];
  
  }
  for($i=0; $i&lt;count($_POST["mail"]); $i++){
  
  echo $_POST["mail"][$i];
  
  }
  </code></pre>
  
  <p>For a specific example right now I have three rows, I "check" the first and the last. </p>
  
  <p>When I parse the form data the checkbox array returns the values for the first and the last only, but if I try to parse the mail[] it has all the values for rows 1, 2, and 3. </p>
  
  <p>Any ideas on how to properly configure this? I'm sure there's something wrong with the structure, just looking for confirmation.</p>