PHP AJAX Live Search

PHP AJAX Live Search


AJAX can be used to create more user-friendly and interactive searches.In this article I will show you, how to read an xml file using with AJAX.

Let’s have an example, how to read links from xml file using with AJAX in PHP.

Here we have to creating simple web page UI which contains one text box, when we enter a character into textbox then this character will be searched into xml file and appropriate link will be returned to the web browser. 

Coding of ‘LiveSearchAjax.php

output :

Coding of ‘LiveSearchContent.php’:

Here I am using ‘liveSearch.xml’ file. The structure of ‘liveSearch.xml’ file:

 

Output :