title: Multiple checkbox delete javascript
body: <p>I have this code which <code>delete</code> from database rows.But it removes one by one when pressing <code>delete</code>, <code>checkbox</code> not working.I want to <em>multiple delete by checking checkbox.</em></p>
  
  <pre><code>function confirmDelete(delUrl) {
          if (confirm("Are you sure you want to delete")) {
              document.location = delUrl;
          }
      }
  
  function check() {
              document.getElementById("myCheck").checked = true;
          }
  
          function uncheck() {
              document.getElementById("myCheck").checked = false;
          }
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;a href="javascript:confirmDelete('?action=deleteurl&amp;id=&lt;?php echo $row[0]; ?&gt;')"&gt;
      &lt;input type="checkbox" id="myCheck[]"&gt;delete&lt;/td&gt;
  </code></pre>
  
  <p>PHP</p>
  
  <pre><code>&lt;?php
  if($_GET['action'] == "deletelink" &amp;&amp; !empty($_GET['id']) &amp;&amp; is_numeric($_GET['id'])) {
      $result = mysql_query("SELECT * FROM books WHERE id='".intval($_GET['id']);
  
      while ($row = mysql_fetch_array ($result) )
          unlink("/home/me/public_html/upload/image/{$row['image']}");
  }
  </code></pre>