# Solved: PHP and AJAX Live Search



## EnfoToad (Jun 22, 2007)

Hey Guys!

I am trying to make a live search for my site with PHP and AJAX. I am using the following page for a sample: http://www.w3schools.com/PHP/php_ajax_livesearch.asp

It turns out my sample does not even work. Here is a picture of what I mean:
http://farm3.static.flickr.com/2172/2513787057_0ac91f6ced_o.jpg

Here are all my files in the folder (there are not other files):

index.html
livesearch.js


> var xmlHttp
> 
> function showResult(str)
> {
> ...


livesearch.php


> <?php
> $xmlDoc = new DOMDocument();
> $xmlDoc->load("links.xml");
> 
> ...


links.xml


> <pages>
> -
> 
> HTML DOM alt Property
> ...


THANKS FOR THE HELP!


----------



## tomdkat (May 6, 2006)

Looks like livesearch.php isn't being processed by the PHP engine on your server, for some reason. Does your web server support PHP? Do you have other PHP scripts that run ok on the server?

Peace...


----------



## EnfoToad (Jun 22, 2007)

Found the mistake. The PHP file is misplaced.


----------



## tomdkat (May 6, 2006)

Misplaced how?

Peace...


----------

