Autocomplete with PHP? Can't figure this out

Autocomplete with PHP? Can't figure this out

Okay here's the deal, I'm trying to get autocomplete to work on a form, and its pulling from an PHP file on my server.

Just to make this open, the file in question is  http://textbookly.com/jQuerytest/code/ajax.php?term=test where test is where the query is. Its output is text, and I think the format is acceptable.

<script type="text/javascript"> 
$(function() { function log(message) { 
$("<div/>").text(message).prependTo("#log"); 
$("#log").attr("scrollTop", 0); } 
$("#birds").autocomplete({ source: "search.php", minLength: 2, select: function(event, ui) 
{ log(ui.item ? ("Selected: " + ui.item.value + " aka " + ui.item.id) : "Nothing selected, input was " + this.value); } }); });
</script>

This seems to be the right example code, but when I configure it I can't get it to work. Any ideas?