I fairly new to JQuery and perhaps trying to achieve something that might be abit harder for a beginner. However I am trying to create an autocomplete that sends the curren
Simple Jquery ui autocomplete, for those who might need it.
//select data from the table
$search = $db->query('SELECT Title from torrents');
//then echo script tags and variables with php
$(function() {
var availableTags = [';
foreach ($search as $k) {
echo '"'.$k['Title'].'",';
}
echo '];
$( "#tags" ).autocomplete({
minLength:2, //fires after typing two characters
source: availableTags
});
});
';
?>
your html form