Ajax JQuery PHP

How to Search Data Without Page Refresh in PHP MySQL using Ajax

search without refresh in PHP MySQL using Ajax

Hi, in this article we are going to teach you How to Search data without page refresh in PHP MySQL using Ajax. in will be very easy for the users of your website. user’s don’t have to wait for web content like text, images and other files to search. when you click the search button or press enter key the result will be displayed on the same page and without page refresh. This is very simple and interesting. Lets Start the tutorial. you may also download How to Search with Auto Suggest in PHP MySQL using JQuery .

How to Search Data Without Page Refresh in PHP MySQL using Ajax

1-Creating Database

  • Open Phpmyadmin in your Browser
  • Click on Database Tab Display on Top side
  • Give the Database name “searching”.
  • After Creating Database Open it.
  • Click on SQL Tab on Top area
  • Copy the Below Source Code and paste it.
  • Then Click on Go.

OR Import DB File

After Downloading the source code extract it in your root folder.

  • Open Phpmyadmin in your Browser
  • Click on Database Tab Display on Top side
  • Give the Database name “searching”.
  • After Creating Database Open it.
  • Click on Import Tab on Top area
  • You can Find Db file in  Downloaded source code Select it.
  • Then Click on Go.

Download More Source Code Like

2- Creating Database Connection

After import Database File then next step is creating database connection using php copy the below code and save it is as “dbcon.php”.

3 – Creating Search Form Using HTML

in this step we are going to creating a search form using HTML. Below the source code

4 – Load Data Without Refresh Using Ajax

in this step we are going to create Ajax script for getting data without page refresh.

5 – Fetch Data From Database Using PHP

Next step is get data from MySQL Database using PHP. here you can find source code below.

If you facing any type of problem with this source code then you can Download the Complete source code in zip Formate by clicking the below button Download Now otherwise you can send Comment.

[clickToTweet tweet=”How to Search Data Without Page Refresh in PHP MySQL using Ajax” quote=”How to Search Data Without Page Refresh in PHP MySQL using Ajax” theme=”style5″]

 

About the author

Deepak

Hi, This is Deepak Raj from Sourcecodesite.com.I am a Web Developer, Blogger, Online Instructor and SEO consultant who has been working online for last 4 years and he is running several successful websites on the internet.

Leave a Comment