title: Using ajax to update is not working on data-table and codeigniter
body: <p><a href="https://i.stack.imgur.com/tgLwd.png" rel="nofollow noreferrer">!</a>My update is not working but I using the same code in its website.
  <a href="https://mbahcoding.com/tutorial/php/codeigniter/codeigniter-ajax-crud-modal-server-side-validation.html" rel="nofollow noreferrer">https://mbahcoding.com/tutorial/php/codeigniter/codeigniter-ajax-crud-modal-server-side-validation.html</a></p>
  
  <p>My update chrome in the network preview </p>
  
  <p><a href="https://i.stack.imgur.com/Q88GP.png" rel="nofollow noreferrer">enter image description here</a>.</p>
  
  <p>sample website update chrome in the network preview</p>
  
  <p><a href="https://i.stack.imgur.com/h6nhJ.png" rel="nofollow noreferrer">enter image description here</a>.</p>
  
  <p>Here is ajax update on network response. 
  <a href="https://i.stack.imgur.com/tgLwd.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>I try normal way to do it but always have an error.</p>
  
  <p>controller......</p>
  
  <pre><code> public function ajax_update()
  {
  
      $data = array(
              'book_title' =&gt; $this-&gt;input-&gt;post('book_title'),
              'book_isbn' =&gt; $this-&gt;input-&gt;post('book_isbn'),
              'book_yop' =&gt; $this-&gt;input-&gt;post('book_yop'),
              'book_active' =&gt; $this-&gt;input-&gt;post('book_active'),
              'author_name' =&gt; $this-&gt;input-&gt;post('author_name'),
               'publisher_name' =&gt; $this-&gt;input-&gt;post('publisher_name'),
          );
    $this-&gt;user_model-&gt;update_book(array('book_id' =&gt; $this-&gt;input-&gt;post('book_id')), $data);
      echo json_encode(array("status" =&gt; TRUE));
  
  }
  </code></pre>
  
  <p>model..........</p>
  
  <pre><code>public function update_book($data, $where)
  {    
  
         $this-&gt;db-&gt;update('books',$data,$where);
           return $this-&gt;db-&gt;affected_rows();
  
  }
  </code></pre>
  
  <p>If I print_r($data); blew is the result.  I think my issue is data is not passed to the database.
  <a href="https://i.stack.imgur.com/WnNgC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WnNgC.png" alt="enter image description here"></a></p>