Autocomplete search using php, mysql and ajax

Must Read : Autocomplete search using php, mysql and ajax

We know what is autocomplete in input type, that is make some predefined entered texts come under the input type box, while focusing on the input type, similarly we are searching some content from mysql database, this actually facebook style search concept to suggest some data for select before we get the exact search, for that we are using this kind of search, and this is very simple to make search in php, mysql with ajax and jquery. let see it in brief.
as like you see in the above image, the search will be comes like that by using php, mysql and ajax with jquery.
DATABASE DETAILS
database name–>wearecoders
table name –> autocomplete
column names –> id, name, email
DB.PHP

the above is database file.

INDEX.PHP

just give this input type only in index page with AJAX. you can see the ajax coding below here that is also comes in index page

AJAX

the above all for make action in SEARCH page with out refreshing the page.

SEARCH.PHP

that’s it. as like the usual fetch from database with like and here we are just adding str_ireplace, that’s it. and other thinks are as like we know, that is very simple one. let’s try this. and each of our entering text that wil comes as in strong letter.

(Visited 244 times, 1 visits today)

Leave a Comment.