title: jQuery autocomplete in PHP
body: <p>I have autocomplete textbox for searching items or shops. Also there are two radio buttons below this search textbox which are named as Shop and another one is item.
  By default Shop is checked on Page load. When user tries to type in the search textbox, the request is sent to a PHP page which fires a database query to show the autocomplete search result in the textbox. This works fine, but what I want to achieve is when the Shop radio button is checked it should get data for shops whereas when item is checked it should get details of items.
  At the moment this is not happening. Please advise. </p>
  
  <p>My Code:</p>
  
  <pre><code>$(document).ready(function(){
  
  
   $("#keyword").autocomplete("autocomplete.php", {
          selectFirst: false
      });
  });
  
  
  $("#keyword").keyup(function() 
  {
  
  $("input:radio[name=shop]").click(function() {
       var status = $(this).val();
       if(status=='item')
       {
       $("#keyword").autocomplete("autocomplete_2.php", { // has code for fetching shop details from DB
            selectFirst: false
        });
       }
   });
  
  });
  </code></pre>