Integrate live search box Ajax PHP and MySQL and type keyword

HTML, PHP 0 Comments
tutorial-for-ajax-php

How to integrate live search Ajax  PHP and MySQL Database . Ajax Live Search with PHP MySQL Step by step. How to search the record without refresh page in MYSQL PHP and Ajax. Database results are shown as you type in Input box. If you enter  any keyword show the record without refresh page using Ajax PHP Mysql. Get Search result without refresh the page . Search and view the data from Database without refresh page using PHP, MySql, Ajax and Jquery.

In this Post we are going to implement the live search using the Ajax, MYSQL and PHP.

Working of Live search is if we type in input box and quickly show the content related search.

Daily Visit GK on myshort.in

Search the record without refresh page jquery in MYSQL Ajax PHP.

PHP Ajax based dynamic keyword search Mysql

Ajax Search Box in PHP and MySQL

Database name = find

Table name =  phonecommet

Column names for Db => id , namep,  phonep,  msgp.

Ajax  javascript code used in live search

Out Put of live search box using Ajax PHP MySQL

live-search-ajax-php-mysql
live-search-ajax-php-mysql

 

 

Check Ajax Code Script

<script type = “text/javascript” >

$(document).ready(function(){

var req = null;

$(‘#keysearch’).on(‘keyup’, function(){

var key = $(‘#keysearch’).val();

if (key && key.length > 2)

{

$(‘#loading’).css(‘display’, ‘block’);

if (req)

req.abort();

req = $.ajax({

url : ‘fetch_record.php’,

type : ‘POST’,

cache : false,

data : {

keysearch : key,

},

success : function(data)

{

console.log(data)

if (data)

{

$(‘#loading’).css(‘display’, ‘none’);

$(“#result”).html(data).show();

}

}

});

}

else

{

$(‘#loading’).css(‘display’, ‘none’);

$(‘#result’).css(‘display’, ‘none’);

}

 

});

});

 

Databse of live search box using Ajax PHP MySQL

databse-live-search-in-ajax
database-live-search-in-ajax

 

 

Download  Ajax  javascript code used in live search

 

 

 

 

 

 

 

 

Buy online Rajasthan gk book Railway JE CBT REET PAtwari Book SSC CGL Clerk GD Book Buy online Rajasthan gk book Railway JE CBT REET PAtwari Book SSC CGL Clerk GD Book

share..Share on Facebook0Share on Google+0Tweet about this on TwitterShare on LinkedIn0