A: 

It looks like you are using a stand alone php script, which means that Drupal shouldn't be bootstrapped and you basically can't use any of Drupal functions, unless you already bootstrap Drupal without showing. If you do bootstrap Drupal, there's not much point in using a stand alone PHP script.

Another thing is that you should put the % for the like query directly in the sql instead:

WHERE title LIKE '%s%' ... $search

Another thing is that you are doing:

$('#search-results').html(data);

Which should work, but shouldn't be pretty since it's a json encoded string you are inserting. You might considder using $.getJSON which will convert the data into json format.

You might also consider debugging your php script, or use firebug to see if you get the expected output.

googletorp
Thanks alot for the comment, i guess i have to make a own module for the php with a menu hook, ill see if i can get it working, thanks again!
Thor