title: typeahead.js and remote php
body: <p>I use typeahead.js with Local data source and worked, but when i try to collect data from remote url i have no luck this is my code :</p>
  
  <pre class="lang-js prettyprint-override"><code>$('#keyword').typeahead({
      minLength: 3,
      remote: 'http://example.com/includes/search.php?g=%QUERY',
      limit: 10
  });
  </code></pre>
  
  <p>and this is my php code :</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;? PHP
      $qsrc = mysql_query("SELECT `state_id` AS `all_id`,`name` AS `names`, MATCH(name) AGAINST('".$_REQUEST('g')."') AS `score` FROM `_state` WHERE MATCH(name) AGAINST('".$_REQUEST('g')."' IN BOOLEAN MODE) ORDER BY `score` DESC");
      $arr = array();
      while ($rsrc = mysql_fetch_assoc($qsrc)) {
          $arr[] = array('id' = &gt; $rsrc['all_id'], 'name' = &gt; $rsrc['names']);
      }
      echo json_encode($arr);
  ?&gt;
  </code></pre>
  
  <p>did i miss something? </p>