title: How to perform bulk delete operation in wp
body: <p>I have written as below code:</p>
  
  <pre><code>&lt;?php
  global $wpdb;
  $table = $wpdb-&gt;prefix . 'submitted_form'; 
  $randomFact = $wpdb-&gt;get_results( "SELECT * FROM " .$table);
  $NumRows = count((array) $randomFact);
  ?&gt;
  &lt;form name="delform" method="post" action=""&gt;
   &lt;table&gt;
   &lt;?php for($i=0; $i&lt;=$NumRows-1; $i++){ ?&gt;
   &lt;tr&gt;
   &lt;td&gt;&lt;input name="checkbox[]" type="checkbox" id="checkbox[]" value="&lt;?php print          $randomFact[$i]-&gt;id; ?&gt;"&gt; &lt;/td&gt;
  &lt;td&gt;&lt;?php print $randomFact[$i]-&gt;name; ?&gt;&lt;/td&gt;
  &lt;td&gt;&lt;?php print $randomFact[$i]-&gt;address; ?&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;?php } ?&gt;
   &lt;tr&gt;
  &lt;td&gt;&lt;input name="delete" type="submit" id="delete" value="Delete"&gt;&lt;/td&gt;
  &lt;/tr&gt;
   &lt;?php if($delete): ?&gt;
    &lt;?php for($i=0; $i&lt;=$NumRows-1; $i++){ ?&gt;
    &lt;?php $id = $checkbox[$i]; ?&gt;
     &lt;?php $wpdb-&gt;query("DELETE FROM wp_submitted_form WHERE id =".$id); ?&gt;
      &lt;?php } ?&gt;
     &lt;?php endif; ?&gt;
     &lt;/table&gt;
    &lt;/form&gt;
  </code></pre>
  
  <p>The deletion operation doesn't work... Please help me </p>