I want to be able to autocomplete an input box from a remote php script.
Say for example, I had a script which got a variable from the *post* and was able to produce an array based on what was posted, how do I return and use the results in Jquery autocomplete widget.
//do the magic here
$array=('item 1','item 2', 'item 3', 'etc');
how would I use the above script to autocomplete a standard input box, would I need to output it as json and would I need to set headers etc?
<form action ='search.php' method='post'>
<input type='text' class='search' name='q'>