title: I am having trouble to display the json variables from jquery autocomplete
body: <ul>
  <li>The names are not displaying in the dropdown box of autocomplete</li>
  <li>And how can I assign each variable to a specific textbox when I get the response</li>
  </ul>
  
  <p>HTML:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/&gt;
  &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body style="font-size:62.5%;"&gt;
  &lt;input type="text" id="name" /&gt;
  &lt;input type="text" id="id" /&gt;
  &lt;input type="text" id="tel" /&gt;
  &lt;script&gt; $("#name").autocomplete({ source: "php/company.php" });  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>PHP:</p>
  
  <pre><code>$term = strtolower($_GET["term"]);
  
  $sql = "select ID,NAME,TEL from COMPANY where NAME like '%$term%' order by NAME";
  $result = mysql_query($sql, DBCONN) or die ("&lt;br&gt;MySQL Error: " . mysql_error(DBCONN));
  while($row = mysql_fetch_array($result)) 
  {
      $row_set = array( 
                  "label" =&gt; $row['NAME'], 
                  "id" =&gt; $row['ID'],
                  "tell" =&gt; $row['TEL'] );
  }
  echo json_encode($row_set);
  </code></pre>
  
  <p>FIREBUG JSON RESPONSE:</p>
  
  <pre><code>{"label":"MacDonald","id":"1","tel":"1-800-4444"}
  </code></pre>