title: How to update MYSQL field without refreshing page in PHP?
body: <p>I wish to update MYSQL data using text instead of using submit button.
  Admin will choose option from combobox and then click at save to update the MYSQL records.
  How to do this using AJAX or jquery?</p>
  
  <p>My coding:</p>
  
  <pre><code>&lt;?php
  
  include('config.php');
  
  $per_page = 9; 
  
  if($_GET)
  {
  $page=$_GET['page'];
  }
  
  
  
  //get table contents
  $start = ($page-1)*$per_page;
  $sql = "SELECT bookingID,eventinfo.eventTitle,boothAlias,testbook.bstatus,date, testbook.username, customer.companyName, customer.contactName from eventinfo, testbook, customer where testbook.username=customer.username AND testbook.eventID=eventinfo.eventID order by date desc limit $start,$per_page";
  $rsd = mysql_query($sql);
  ?&gt;
  
  &lt;form method="post" name="form"&gt;
  &lt;table width="800px"&gt;
  
      &lt;?php
      //Print the contents
  
      while($row = mysql_fetch_array($rsd))
      {
  
          $id=$row['companyName'];
          $contactName=$row['contactName'];
          $eventTitle=$row['eventTitle'];
          //$phone=$row['phone'];
          $date=$row['date'];
          $status=$row['bstatus'];
          $booth=$row['boothAlias']
  
      ?&gt;
      &lt;tr&gt;&lt;td style="color:#B2b2b2; padding-left:4px"&gt;&lt;?php echo $id; ?&gt;&lt;/td&gt;&lt;td&gt;&lt;?php echo $contactName; ?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $eventTitle; ?&gt;&lt;/td&gt;&lt;td&gt;&lt;?php echo $booth; ?&gt;&lt;/td&gt;&lt;td&gt;&lt;?php echo $date; ?&gt;&lt;/td&gt;&lt;td&gt;&lt;select name='status' id='status'&gt;
          &lt;option value='-1'&gt;--Select--&lt;/option&gt;
      &lt;option value='0'&gt;Approve&lt;/option&gt;
      &lt;option value='1'&gt;Reject&lt;/option&gt;
      &lt;option value='2'&gt;Pending&lt;/option&gt;
      &lt;/select&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=#&gt;save&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;?php
      } //while
      ?&gt;
  &lt;/table&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><a href="http://i.imgur.com/IrOCt.jpg" rel="nofollow">image</a></p>