title: Cannot delete row using check box
body: <p>I'm trying to delete a row from table which is connected to database using checkbox (and it wouldn't matter if its just one row or multiple rows), but it is not working, as in nothing happens. It doesn't delete, no errors or warnings appear just a refresh. </p>
  
  <p>php:</p>
  
  <pre><code> &lt;?php
      if(isset($_POST['del_event']))
      {
       if(isset($_POST['check']) &amp;&amp; count($_POST['check']))
       {
        $array = array("check" =&gt; $_POST['check']);
        $id = implode(',', $array['check']);
        $result = mysql_query("DELETE FROM event WHERE event_id = '$id'") or die(mysql_error());
        }
      }
    ?&gt;
  </code></pre>
  
  <p>html:    </p>
  
  <pre><code>&lt;form class="buttons" method="post" action="event.php"&gt;
  &lt;div class="button-wrap"&gt;
  &lt;input type="button" id="add_event" name="add_event" value="Add Event"/&gt;
  &lt;input type="submit" id="del_event" name="del_event" value="Delete Event"/&gt;
  &lt;/div&gt;  
   &lt;/form&gt;
  &lt;tbody class="tbody-event-list-table2"&gt;
  &lt;?php
   require "connection.php";
    $check = mysql_query("SELECT * FROM event") or die(mysql_error());
   if(mysql_num_rows($check) &gt; 0)
  {
  while($row = mysql_fetch_array($check))
  {
       $id = $row['event_id'];
      $name = $row['event_name'];
      $start = $row['start'];
      $end = $row['end'];
      $venue = $row['event_venue'];
  echo 
  "&lt;tr&gt;
    &lt;td&gt;&lt;input type='checkbox' name='check' id='check' class='check' value='$id'/&gt;&lt;a href=''        
   class='event-link'&gt;$name&lt;/a&gt;&lt;/td&gt;&lt;td&gt;$start&lt;/td&gt;&lt;td&gt;$end&lt;/td&gt;&lt;td&gt;$venue&lt;/td&gt;";
   echo "&lt;/tr&gt;";
   }
  }   
  else
  {
    echo 
    "&lt;tr&gt;
     &lt;td colspan='4'&gt;There Are No Events.&lt;/td&gt;
    &lt;/tr&gt;";
  }
  ?&gt;
  &lt;/tbody&gt;
  </code></pre>
  
  <p>It is <code>if(isset($_POST['del_event']))</code> because 'del_event' is a name of a delete button which is disabled unless a checkbox is checked.</p>
  
  <pre><code>&lt;script&gt;
   var chkbox = $(".check"),
              button = $("#del_event");
         button.attr("disabled","disabled");
          chkbox.change(function(){
              if(this.checked){
                  button.removeAttr("disabled");
              }else{
                  button.attr("disabled","disabled");
              }
          });
    &lt;/script&gt;
  </code></pre>
  
  <p>php version is 5.5.9</p>