title: how can i save jquery ui sortable order in php
body: <p>i have <code>new_cats</code> table it contains <code>id, title, order</code> and i post data from the table like this </p>
  
  <p><strong>php</strong></p>
  
  <pre><code>    &lt;table&gt;
      &lt;tbody class="sort"&gt;
      &lt;?php
      $select_newscats = $mysqli-&gt;query("SELECT * FROM news_cats order by ord_show asc");
  
      while ($rows_newscats = $select_newscats-&gt;fetch_array(MYSQL_ASSOC)){
  
      $id_newscats          = $rows_newscats ['id'];
      $title_newscats       = $rows_newscats ['title'];
      $order_newscats       = $rows_newscats ['order'];
      ?&gt;
      &lt;tr class="trtable" id="item_&lt;? echo $id_newscats; ?&gt;"&gt;
      &lt;td&gt;&lt;? echo $id; ?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;? echo $title_newscats; ?&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;?
      }
      ?&gt;
  &lt;button class="savesort"&gt;&lt;/button&gt;
      &lt;/tbody&gt;
      &lt;/table&gt;
  </code></pre>
  
  <p>and i have this jquery code to sortable table and trying to update order in database </p>
  
  <pre><code>$(document).ready(function(){
  $(".sort").sortable({
          update: function (event, ui) {
              var order = $(this).sortable('serialize');
          }
      }).disableSelection();
  
  $('.savesort').on('click', function () {
  var aa = $(".sort").sortable("serialize", {
  attribute: "id"
  });
  
  var s = {
  "aa":aa
  }
  
  $.ajax({
  data: s,
  type: 'POST',
  url: 'ajax/save_newscats_ord.php',
  success:function(data){
      alertify.success(data);
    }
  });
  return false;
  });
  
  });
  </code></pre>
  
  <p>in this page <code>save_newscats_ord.php</code>i tried to save order but i don't get any data from jquery code i tried this code to get data</p>
  
  <pre><code>&lt;?php
  $list = $_post['aa'];
  echo $list;
  ?&gt; 
  </code></pre>
  
  <p>how can i send data to php page and how can i save it in my database in order filed </p>