tabledit(编辑和删除功能)无法正常工作[重复]

I'm having a bit of trouble using the tabledit addon. It appears to be working fine when I save the updated columns... but when I refresh the page it goes back to what it was before the attempted update. I shortened my code a bit so its more readable. Please help! I have no idea what I'm doing wrong.

I'm posting my code below

Thanks a lot,

contact_view.php--this displays the contacts along with the edit/delete button

<?php
if(!isset($_SESSION['username'])){
   header("location:login.php");
}
$connect = mysqli_connect("localhost", "root", "", "contacts");
$query = "select contact_id, first_name, last_name from contact where
  contact_owner = '".$_SESSION ["username"]."'";
$result = mysqli_query($connect, $query);
?>
<html>  
<head>  
<title>Contact List</title>  
    <script     
     src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
    <link rel="stylesheet"        href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />  
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>            
<script src="jquery.tabledit.min.js"></script>
</head>  
<body>  
<div class="container">  
   <br />  
   <br />  
   <br />  
<div class="table-responsive">  
    <h3 align="center">Contact List</h3><br />  
    <table id="editable_table" class="table table-bordered table-striped">
     <thead>
     <tr>
            <th>ID</th>
            <th>First Name</th>
            <th>Last Name</th       
      </tr>
     </thead>
     <tbody>
     <?php
     while($row = mysqli_fetch_array($result))
     {
      echo '
  <tr>
   <td type="text" name="contact_id">'.$row["contact_id"].'</td>
   <td type="text" name="first_name">'.$row["first_name"].'</td>
   <td type="text" name="last_name">'.$row["last_name"].'</td>
  </tr>
      ';
     }
     ?>
     </tbody>
    </table>
   </div>  
  </div>  
 </body>  
</html>  
<script>
$(document).ready(function(){  
     $('#editable_table').Tabledit({
      url:'action.php',
      columns:{
       identifier:[0, "contact_id"],
      editable:[[1, 'first_name'], 
                [2, 'last_name']] 
          },
          restoreButton:false,
         onSuccess:function(data, textStatus, jqXHR)
          {
           if(data.action == 'delete')
           {
            $('#'+data.id).remove();
           }
          }
         });

    });  
      </script>

action.php--performs the query

<?php  
//action.php
session_start();
include 'dbc.php';

$input = filter_input_array(INPUT_POST);

$first_name = mysqli_real_escape_string($conn, $input["first_name"]);
$last_name = mysqli_real_escape_string($conn, $input["last_name"]);

if($input["action"] === 'edit')
{
 $query = "
 UPDATE 'contact' 
 SET 'first_name' = '".$first_name."', 
     'last_name' = '".$last_name."' 
   WHERE 'contact_id' = '".$input["contact_id"]."'
                                             ";

 mysqli_query($connect, $query);

}
if($input["action"] === 'delete')
{
 $query = "
 DELETE FROM 'contact' 
 WHERE contact_id = '".$input["contact_id"]."'
 ";
 mysqli_query($connect, $query);
}

 echo json_encode($input);

?>
</div>