I am trying to develop a feature on my website that automatically grabs routes available from my table and populate them in a jQuery autocomplete textbox that shows results as they type
I've managed to get the query together, and it works perfectly...but without the jQuery added onto it
Heres the code on its own
<?PHP
mysql_connect('localhost', 'sample', 'sample');
mysql_select_db('winning');
$sql = "SELECT distinct rout_to FROM search_v ORDER BY rout_to ASC" ;
$result = mysql_query($sql);
echo '<div class="ui-widget"><select id="combobox" name="arrival_label">';
while ($row = mysql_fetch_array($result)) echo "<option value='" . $row['rout_to'] . "'>" . $row['rout_to'] . "</option>";
echo "</select></div>"; ?>
when i tested the autocomplete combobox from the jquery ui library, it worked fine on its own, without the php data
My question was, how would I get these two to play nice?
worked fine on its own, without the php data
.. ?? it gets the data as a json from server – Gaurav Shah Apr 12 '12 at 10:16