title: How can I add a check box to a data table to be used to delete the selected row?
body: <p>I'm trying to add a check box to each row of my search results to allow the selected row of data to be deleted from MySQL and I'm stuck on how to do it. </p>
  
  <p>here is what I have for my code I want to add the delete feature to.</p>
  
  <pre><code> echo '&lt;table width="100%" border="1" align="center" cellpadding="0" cellspacing="0"&gt;';
      echo '&lt;th&gt;ID&lt;/th&gt;&lt;th&gt;Team&lt;/th&gt;&lt;th&gt;Last Name&lt;/th&gt;&lt;th&gt;First Name&lt;/th&gt;&lt;th&gt;Registered&lt;/th&gt;&lt;th&gt;Payment&lt;/th&gt;&lt;th&gt;Physical&lt;/th&gt;&lt;th&gt;Photo Taken&lt;/th&gt;&lt;th&gt;Member Photo&lt;/th&gt;&lt;th&gt;View Member&lt;/th&gt;&lt;th&gt;Edit Member&lt;/th&gt;&lt;th&gt;Delete&lt;/th&gt;';
      while($rows = mysql_fetch_array($raw_results)){
      // If $color==1 table row color = #FFC600
      if($color==1){
      echo "&lt;tr bgcolor='#C6E7F7'&gt;
      &lt;td&gt;&lt;center&gt;".$rows['id']."&lt;/td&gt;&lt;/center&gt;&lt;td&gt;&lt;center&gt;&lt;img src='".$rows['logo_src']."'height='30' width='50'/&gt;&lt;/td&gt;&lt;td&gt;&lt;center&gt;".$rows['last_name']."&lt;/td&gt;&lt;/center&gt;&lt;td&gt;&lt;center&gt;".$rows['first_name']."&lt;/center&gt;&lt;/td&gt;&lt;td&gt;&lt;center&gt;".$rows['registration']."&lt;/center&gt;&lt;/td&gt;&lt;td&gt;&lt;center&gt;".$rows['pay_status']."&lt;/center&gt;&lt;/td&gt;&lt;td&gt;&lt;center&gt;".$rows['physical']."&lt;/center&gt;&lt;/td&gt;&lt;td&gt;&lt;center&gt;".$rows['photo']."&lt;/center&gt;&lt;/td&gt;&lt;td&gt;&lt;center&gt;&lt;img src='".$rows['member_photo']."'height='30' width='50'/&gt;&lt;/center&gt;&lt;/td&gt;&lt;td&gt;&lt;center&gt;&lt;a href=view_member.php?id=$rows[id]&gt;&lt;img src=data/icons/viewmore.gif height='20' width='20' border='0'/&gt;&lt;/center&gt;&lt;/td&gt;&lt;td&gt;&lt;center&gt;&lt;a href=edit_member.php?id=$rows[id]&gt;&lt;img src=data/icons/viewmore.gif height='20' width='20' border='0'/&gt;&lt;/center&gt;&lt;/td&gt;&lt;td&gt;&lt;center&gt;&lt;/tr&gt;";
  </code></pre>
  
  <p>so the very last column where it say's delete, I want to add a checkbox in the rows below that and then a button below the search results box to delete the selected row. I'm stuck on how to add the checkbox.</p>
  
  <p>Here's a pic of the results page </p>
  
  <p><img src="https://i.stack.imgur.com/ixNCQ.png" alt="enter image description here"></p>