title: JQuery Ajax not updating record
body: <p>I have some jquery ajax code to update a record but it's not working as expected.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>    function update_records() {
      $.ajax({
    type: "POST", // Set the type then $_GET['id'] or $_POST['id']
    url: "update_record.php",
    data: { category: "John", image: "Boston" }
  }).done(function( msg ) {
    alert( "Data Saved: " + msg );
  });
  
  }; //end function
  
  
  Then the php
  
  &lt;?php 
  
    $id = $_REQUEST['id'];
  
  
    include 'config.php';
  
  
    $result = mysql_query("UPDATE mytable SET title = 'something' where id=$id"); 
    $result = mysql_query("SELECT * FROM mytable WHERE id = '$id'");             
    $array = mysql_fetch_row($result);  
  
  ?&gt;
  </code></pre>