Tagged: search

PHP AJAX Live Search Box Autocomplete Using MySQL Database 0

PHP AJAX Live Search Box Autocomplete Using MySQL Database

Today, We want to share with you PHP AJAX Live Search Box Autocomplete Using MySQL Database.In this post we will show you PHP Jquery AJAX Live Search Box Using MySQL, hear for PHP MySQL Live Search Box using Jquery Ajax Example we will give you demo and example for implement.In this post, we will learn about Jquery Ajax Live Search Box using PHP MySql with an example.

PHP AJAX Live Search Box Autocomplete Using MySQL Database

There are the Following The simple About PHP AJAX Live Search Box Autocomplete Using MySQL Database Full Information With Example and source code.

As I will cover this Post with live Working example to develop ajax live data search using jquery php mysql, so the some major files and Directory structures for this example is following below.

  • index.php
  • fetch.php

Step 1: Creating the Database Table

— Database: `member_list` >> — Table structure for table `member_tbl`

CREATE TABLE IF NOT EXISTS `member_tbl` (
  `MemberID` int(11) NOT NULL AUTO_INCREMENT,
  `MemberName` varchar(250) NOT NULL,
  `member_addr` text NOT NULL,
  `member_city` varchar(250) NOT NULL,
  `member_pcode` varchar(30) NOT NULL,
  `member_country` varchar(100) NOT NULL,
  PRIMARY KEY (`MemberID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ;

Step 2: Dumping data On Table

Dumping data for table `member_tbl`

//ajax live data search using jquery php mysql
INSERT INTO `member_tbl` (`MemberID`, `MemberName`, `member_addr`, `member_city`, `member_pcode`, `member_country`) VALUES
(1, 'Jaydeep Gondaliya', 'sejal Str. 57', 'Berlin', '12209', 'Germany'),
(2, 'Ankit Kathiriya', 'Avda. de la Ram park 2222', 'USA D.F.', '5021', 'USA'),
(3, 'Krunal Sisodiya', 'sardha 2312', 'USA D.F.', '5475', 'USA'),
(4, 'chirag dethariya', '120 dsp salon Sq.', 'London', 'WA1 1DP', 'UK'),
(5, 'Dhaval dave', 'Rua do Ganesh, 12', 'Resende', '56458-363', 'UEA'),
(6, 'Pooja solanki', 'ul. astha 68', 'Walla', '01-658', 'Poland'),
(7, 'Bhakti Banugariya', 'kavya 45', 'Helsinki', '2853', 'India'),
(8, 'Nilesh chandvadiya', '305 - 14th Ave. S. Suite 3B', 'Seattle', '98128', 'USA'),
(9, 'Hitesh Ajani', 'Rua do Ganesh, 12', 'Resende', '098952-363', 'UEA'),
(10, 'Mayur Dhameliya', 'bhakti 38', 'Oulu', '321452', 'India'),
(11, 'Stavan Patel', '2, rue du chandni', 'Reims', '350024', 'France'),
(12, 'Parag shukla', '722 Titupati Blvd.', 'Kirkland', '360002', 'USA'),
(13, 'Vijay bhanderi', 'Bhavanath. 48', 'Butte', '225010', 'USA');

Step 3: Creating the Search Form

index.php

This is where I will make a simple HTML form and PHP server side source code for our web application. To make the forms simply all souce code copy and write it into your any text editor Like Notepad++, then save file it as index.php.

 
  
  <title>PHP AJAX Live Search Box Autocomplete Using MySQL Database</title>
  
  
  
 
 
  <div class="pakainfo container">
   <br />
   <h2 align="center">PHP AJAX Live Search Box Autocomplete Using MySQL Database</h2>
   
   <b>Simple ajax live data search using jquery php mysql</b><br />
   <div class="pakainfo form-group">
    <div class="input-group pakainfo">
     <span class="input-group-addon pakainfo">Search</span>
     
    </div>
   </div>
   <br />
   <div id="result"></div>
  </div>
 


$(document).ready(function(){

 ajax_data_load();

 function ajax_data_load(query)
 {
  $.ajax({
   url:"fetch.php",
   method:"POST",
   data:{query:query},
   success:function(data)
   {
    $('#result').html(data);
   }
  });
 }
 $('#query_search').keyup(function(){
  var search = $(this).val();
  if(search != '')
  {
   ajax_data_load(search);
  }
  else
  {
   ajax_data_load();
  }
 });
});

Step 4 : Processing Search Query in Backend

fetch.php for PHP AJAX Live Search Box Autocomplete server side source code

 0)
{
 $output .= '
  <div class="pakainfo table-responsive">
   <table class="table table bordered">
    <tr>
     <th>Member Name</th>
     <th>member Address</th>
     <th>member_city</th>
     <th>Member Post Code</th>
     <th>member_country</th>
    </tr>
 ';
 while($memres = mysqli_fetch_array($result))
 {
  $output .= '
   <tr>
    <td>'.$memres["MemberName"].'</td>
    <td>'.$memres["member_addr"].'</td>
    <td>'.$memres["member_city"].'</td>
    <td>'.$memres["member_pcode"].'</td>
    <td>'.$memres["member_country"].'</td>
   </tr>
  ';
 }
 echo $output;
}
else
{
 echo 'Data Not Found';
}

?>

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about PHP AJAX Live Search Box Autocomplete Using MySQL Database.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Laravel AJAX Live Search Example 0

Laravel AJAX Live Search Example

Today, We want to share with you Laravel AJAX Live Search Example.In this post we will show you Laravel 5.6 – Dynamic Ajax Autocomplete Search Box, hear for Create Live Search In Laravel Using AJAX we will give you demo and example for implement.In this post, we will learn about Ajax Live Search Table Generation in Laravel with an example.

Laravel AJAX Live Search Example

There are the Following The simple About Laravel AJAX Live Search Example Full Information With Example and source code.

As I will cover this Post with live Working example to develop Laravel Typeahead Search Tutorial With Example, so the Fetch records from MySQL with jQuery AJAX – Laravel for this example is following below.

Define the Laravel Routes

<?php
Route::get('/live_search', 'LiveSearc[email protected]');
Route::get('/live_search/action', '[email protected]')->name('live_search.action');
?>

Create a Laravel Blade file View

resources/views/live_search.blade.php

<!DOCTYPE html>
<html>
 <head>
  <title>Live search in laravel using AJAX - Pakainfo.com</title>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
 </head>
 <body>
  <br />
  <div class="container box pakainfo">
   <h3 align="center">Live search in laravel using AJAX - Pakainfo.com</h3><br />
   <div class="panel panel-success pakainfo">
    <div class="panel-heading pakainfo">Search Member Data</div>
    <div class="panel-body pakainfo">
     <div class="form-group pakainfo">
      <input type="text" name="search" id="search" class="form-control" placeholder="Search Member Data" />
     </div>
     <div class="table-responsive pakainfo">
      <h3 align="center">Total Member Data : <span id="total_records"></span></h3>
      <table class="pakainfo table table-striped table-bordered">
       <thead>
        <tr>
         <th>Member Name</th>
         <th>RecAddress</th>
         <th>Country</th>
         <th>Postal Code</th>
         <th>Area</th>
        </tr>
       </thead>
       <tbody>

       </tbody>
      </table>
     </div>
    </div>    
   </div>
  </div>

  <script>
$(document).ready(function(){

 fetch_customer_data();

 function fetch_customer_data(query = '')
 {
  $.ajax({
   url:"{{ route('live_search.action') }}",
   method:'GET',
   data:{query:query},
   dataType:'json',
   success:function(data)
   {
    $('tbody').html(data.table_data);
    $('#total_records').text(data.total_data);
   }
  })
 }

 $(document).on('keyup', '#search', function(){
  var query = $(this).val();
  fetch_customer_data(query);
 });
});
</script>

 </body>
</html>

Create the Controller using PHP artisan

php artisan make:controller LiveSearch

Laravel Create Controller

app/Http/controller/LiveSearch.php

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use DB;

class LiveSearch extends Controller
{
    function index()
    {
     return view('live_search');
    }

    function action(Request $request)
    {
     if($request->ajax())
     {
      $output = '';
      $query = $request->get('query');
      if($query != '')
      {
       $data = DB::table('tbl_customer')
         ->where('MemberName', 'like', '%'.$query.'%')
         ->orWhere('RecAddress', 'like', '%'.$query.'%')
         ->orWhere('Country', 'like', '%'.$query.'%')
         ->orWhere('ZipCode', 'like', '%'.$query.'%')
         ->orWhere('Area', 'like', '%'.$query.'%')
         ->orderBy('MemberId', 'desc')
         ->get();
         
      }
      else
      {
       $data = DB::table('tbl_customer')
         ->orderBy('MemberId', 'desc')
         ->get();
      }
      $total_row = $data->count();
      if($total_row > 0)
      {
       foreach($data as $datarow)
       {
        $output .= '
        <tr>
         <td>'.$datarow->MemberName.'</td>
         <td>'.$datarow->RecAddress.'</td>
         <td>'.$datarow->Country.'</td>
         <td>'.$datarow->ZipCode.'</td>
         <td>'.$datarow->Area.'</td>
        </tr>
        ';
       }
      }
      else
      {
       $output = '
       <tr>
        <td align="center" colspan="5">No Any Member Data Found</td>
       </tr>
       ';
      }
      $data = array(
       'table_data'  => $output,
       'total_data'  => $total_row
      );

      echo json_encode($data);
     }
    }
}

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Laravel AJAX Live Search Example.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Search Engine Rankings TIPS AND TRICKS 0

Search Engine Rankings TIPS AND TRICKS

Search Engine Rankings TIPS AND TRICKS

Today, We want to share with you Search Engine Rankings TIPS AND TRICKS.
In this post we will show you Top 10 SEO Tricks – Improving your Google Ranking, hear for The 10 Best Ways to Improve Your Search Engine Ranking we will give you demo and example for implement.
In this post, we will learn about Easy Steps to Increase Google Search Engine Rankings with an example.

Step : 1) Implement Title Tags and Meta Tags

The Website Title Tags are very an important any Search engine of search optimization as they are the best way to find or Search results your any social or marketing some Best skills to your any target country’s or audience.

Step : 2) Quality Content(Content is king)

Your POST or Article data content is very useful so Your content is king for the google or search engines in determining whether or not your website is relevant to your any niche topic your domain related. You want uniq or quality Data, keyword rich Data content.

Step : 3) Acquire Quality All Links

Your Website Links are a Users useful as well as valuable tool for gaining the top any search engine rankings.

Step : 4)Total Number of Back Links

Generally, Google support to crack down on URL link farm any sites (sites where you buy google Ad words links) by your data penalizing them in the any search engine rankings.

Step : 5)high Keyword Relevant Domain Name

Second thing, Before you any server or purchase your domain name keep you should think and look for a URL that has relevant some find keywords to your business or company.

Step : 6) Use Simple HTML

Search engine check or see the find links spiders have a hard time some link reading source coding other than perfect HTML pages. To avoid any data confusion for the check spider have your website written in HTML not video or Flash.

Step : 7) Ease of Site All the Navigation

You want a create website that is easy to all the menu navigate through. The more URL links confusing and some URL broken links to our Website, the less our way wrong so likely it is that the bot or spider will fully search engine crawl and index all the data or content your all the web pages.

Step : 8) Fresh, new Data content

any Search engines do not want news or any post old, outdated your data content on their any search or find results, therefor you must create sure to add new Data content to our Website on a regular way to consistent basis.

Step : 9) Add a Blog to Your Web Site

A blog is a google special or great tool for keeping your visitors up to all the update date to with your website. Blogs more help promote your web site and give your some particular target visitors another way to USA India or more locate your website.

Step : 10) Create Your Website for User Friendly Humans Not Spiders!

It is very probably one of the Most Imp biggest that is done by newcomers to Social or Data reach to internet marketing.

how to Increase Google Search Engine Rankings and

  • Do Find keyword or keyword research
  • Perfect your SEO – on-page SEO
  • Use your perfect related keywords to make great content
  • Step By step Follow or know the Google search ranking algorithm
  • Assess your current useful tools search ranking
  • Diagnose and some issue fixed data current penalties
  • Make links – URL the right way
  • Track and measure google Analytic the right metrics
  • Ensure your blog or website is responsive mobile-friendly

We hope you get an idea about Easy Steps to Increase Google Search Engine Rankings
We would like to have feedback on my Information blog .
Your valuable any feedback, Good question, Inspirational Quotes, or Motivational comments about this article are always welcome.
If you liked this post, Please don’t forget to share this as Well as Like Facebook Page.

We hope This Post can help you…….Good Luck!.