Most Popular UK Tourist Attractions Places List 0

Most Popular UK Tourist Attractions Places List

Most Popular UK Tourist Attractions Places List

Today, We want to share with you Most Popular UK Tourist Attractions Places List.
In this post we will show you 12 Best Places to Visit in the UK, hear for 14 Top-Rated Tourist Attractions in England we will give you demo and example for implement.
In this post, we will learn about UK Tourist Attractions Places List with an example.

Top destinations in United Kingdom

The Foregin country United KingdomUK Tourist Places List, made up of main country England, Northern Ireland and Scotland Wales is an island Global nation in all the Imformation details on northwestern Europe.

Prime minister: Theresa May Trending and United Kingdom Capital is London as well as call or cell phone country code Dialing code is started from +44, And here United Kingdom, Currency: Like as a Pound sterling as big news or Last things Population 6.56 crores ( around 2016) World Bank

Most Popular UK Tourist Attractions Places List

Most Popular UK Tourist Attractions Places List

Top 10 UK tourist Attractions

Best Places to Visit in the UK.

  1. Ancient Stonehenge
  2. Bath
  3. Cambridge & Oxford
  4. Canterbury
  5. Cardiff
  6. Edinburgh
  7. Liverpool
  8. Loch Ness and Inverness
  9. London
  10. Manchester
  11. Medieval Salisbury
  12. Medieval York
  13. The Cotswolds
  14. Wonderful Windsor
  15. the Lake District: Idyllic England

Best Destinations in the United Kingdom

Bath’s Great Person Roman spa and second person centuries-old Top universities at UK universities Name such as a Oxford and Cambridge universities.

Top 22 Best Places to Visit In England

    1. York
    2. Whitstable, Kent
    3. The New Forest
    4. The Lake District
    5. The Cotswolds
    6. Southwold, Suffolk
    7. South Dorset
    8. Sheffield
    9. Oxford
    10. Nottingham
    11. Newcastle upon Tyne
    12. Margate, Kent
    13. Manchester
    14. Liverpool
    15. Devon
    16. Cornwall
    17. Cambridge
    18. Bristol
    19. Brighton
    20. Bath
  1. Alnwick, Northumberland
  2. All London

in main Country England – here cricket birthplace of Top great both Like as a Shakespeare and The Beatles – main is home grounds to the uk London capital, a centrally influential main global centre of all in the world finance and good wastern culture. The UK England is also web site of differnts Neolithic more Stonehenge.

Australia United States Norway and United Kingdom Top University

USA UE Europa CIA JFK News

Read :

Summary

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

I hope you get an idea about Top affordable British destinations perfect for a holiday.
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.

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.

Clear All Cache From Laravel project 5.7 0

Clear All Cache From Laravel project 5.7

Today, We want to share with you Clear All Cache From Laravel project 5.7.In this post we will show you How to clear config cache in Laravel using Artisan, hear for Laravel 5.7 clear cache from route, view, config and all cache data from application we will give you demo and example for implement.In this post, we will learn about Laravel Clear Cache – How to Clear Cache on Views, Config, Route, etc with an example.

Clear All Cache From Laravel project 5.7

There are the Following The simple About Clear All Cache From Laravel project 5.7 Full Information With Example and source code.

As I will cover this Post with live Working example to develop Clear All Cache From Laravel project 5.7 in controller using route, so the laravel clear bootstrap cache Laravel Clear cache Tutorial With Example for this example is following below.

Laravel 5.7 Clear all cache Examples

laravel clear config cache Example with Laravel Clear Cache Commands

Clear Config cache using Laravel

php artisan config:cache

Laravel Clear View cache

php artisan view:clear

Clear Laravel Route cache:

php artisan route:cache

Clear Cache in Laravel facade value

php artisan cache:clear

Reoptimized class loader in Laravel

php artisan optimize

Laravel 5.7 Clear cache in shared hosting server

Route::get('/clear-cache', function() {
    $exitCode = Artisan::call('cache:clear');
    // return what you want
});

We can check the Main Website official doc here http://laravel.com/docs/5.0/artisan#calling-commands-outside-of-cli

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 Clear All Cache From Laravel project 5.7.
I would like to have feedback on my Pakainfo.com blog for Clear All Cache From Laravel application 5.7.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Difference between two dates in years, months, days in PHP 0

Difference between two dates in years, months, days in PHP

Today, We want to share with you Difference between two dates in years, months, days in PHP.In this post we will show you calculate the difference between two dates in PHP, hear for PHP Get difference between two dates in years months days hours minutes we will give you demo and example for implement.In this post, we will learn about php difference between two dates in years months and days with an example.

Difference between two dates in years, months, days in PHP

There are the Following The simple About Difference between two dates in years, months, days in PHP Full Information With Example and source code.

As I will cover this Post with live Working example to develop calculate days between two dates in php, so the PHP Date Exercises Time difference php calculate time difference between two dates in minutes for this example is following below.

PHP Difference Between Two Dates

PHP Date Exercises Time difference in days and years, months, days, hours, minutes, seconds between two dates

$first_date = new DateTime('2019-06-01 02:12:51');
$second_date = new DateTime('2023-05-12 11:10:00');
$live_date_diff = $first_date->diff($second_date);
echo $live_date_diff->days.'Total days'."\n";
echo $live_date_diff->y.' years'."\n";
echo $live_date_diff->m.' months'."\n";
echo $live_date_diff->d.' days'."\n";
echo $live_date_diff->h.' hours'."\n";
echo $live_date_diff->i.' minutes'."\n";
echo $live_date_diff->s.' seconds'."\n";

You can also make a single simple PHP function/Methods to fetch difference between two dates using PHP in years months, days, hours and minutes that will be very helpful for all some filter data or chart or any project. We won’t need to re-write the source code.

//get Simple difference between two dates in years months, days, hours and minute
$live_date_diff = getDateDiff('2019-06-01 02:12:51','2022-05-12 11:10:00');

print_r($live_date_diff);

function getDateDiff($first_date,$second_date) {
    $first_date = new DateTime($first_date);
    $second_date = new DateTime($second_date);
    $live_date_diff = $first_date->diff($second_date);
    
    $nodeResult['total_days'] = $live_date_diff->days;
    $nodeResult['years'] = $live_date_diff->y;
    $nodeResult['months'] = $live_date_diff->m;
    $nodeResult['days'] = $live_date_diff->d;
    $nodeResult['hours'] = $live_date_diff->h;
    $nodeResult['minutes'] = $live_date_diff->i;
    $nodeResult['seconds'] = $live_date_diff->s ;
    return $nodeResult;
}

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 Difference between two dates in years, months, days in PHP.
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.

PHP OOP CRUD MVC Framework Tutorial 0

PHP OOP CRUD MVC Framework Tutorial

Today, We want to share with you PHP OOP CRUD MVC Framework Tutorial.
In this post we will show you php Simple MVC example with source code, hear for CRUD with PHP OOP and MVC we will give you demo and example for implement.
In this post, we will learn about Simple PHP MVC Framework Example with an example.

Welcome to the In Pakainfo.com website! You will Step By Step learn web programming, easy and very fun. This website allmost provides you with a complete web programming tutorial presented in an easy-to-follow manner. Each web programming tutorial has all the practical examples with web programming script and screenshots available.php Simple MVC example with source code

Folder Structure :

******************
===================
MVC
->controller
–>Controller.php
->model
–>user.php
–>Model.php
->view
–>userlist.php
–>viewuser.php
index.php
===================

Source code : Simple php mvc example

index.php

invoke();

?>

Controller.php

username = $username;
	    $this->userfname = $userfname;
	    $this->userinfo = $userinfo;
    } 
}

?>

user.php

username = $username;
	    $this->userfname = $userfname;
	    $this->userinfo = $userinfo;
    } 
}

?>

Model.php

 new Users("only playing", "R. dismelp", "student of the atmiya."),
			"Ravi Korat" => new Users("Moonwalker", "J. Walker", "stud. of th rk collage"),
			"Pragnesh shah" => new Users("hitesh dhameliya", "news boys", "choklate boys")
		);
	}
	public function getBook($username)
	{
		$allBooks = $this->getUserList();
		return $allBooks[$username];
	}
}
?>

userlist.php

<title>php Simple MVC example with source code</title>

<table>
	<tr><td>User Name</td><td>UserFirstName</td><td>UserInfo</td></tr>
	 $users)
		{
			echo '<tr><td><a>username.'">'.$users->username.'</a></td><td>'.$users->userfname.'</td><td>'.$users->userinfo.'</td></tr>';
		}

	?>
</table>


viewuser.php



<title>php Simple MVC example with source code</title>


username . '<br />';
	echo 'userfname:' . $user->userfname . '<br />';
	echo 'userinfo:' . $user->userinfo . '<br />';
?>



MVC run : http://localhost/mvc/

Laravel 5.6 Sending Emails using SMTP Tutorial 0

Laravel 5.6 Sending Emails using SMTP Tutorial

Today, We want to share with you Laravel 5.6 Sending Emails using SMTP Tutorial.In this post we will show you Send Email In Laravel 5.6, hear for How To Send Email In Laravel Tutorial we will give you demo and example for implement.In this post, we will learn about PHP Laravel 5.6 – Send Email using Mail Example with an example.

Laravel 5.6 Sending Emails using SMTP Tutorial

There are the Following The simple About Laravel 5.6 Sending Emails using SMTP Tutorial Full Information With Example and source code.

As I will cover this Post with live Working example to develop laravel 5.6 send mail gmail, so the some major files and laravel 5.6 mail send example for this Send email in Laravel 5.6 email sending services is following below.

  • Simple Install Laravel 5.6
  • Email Settings >> .env
  • Laravel 5.6 Mailable class
  • view file Laravel 5.6
  • Include Route

Send Email In Laravel 5.6

Step 1: Install Laravel 5.6 Project

simple downloading xampp or wampp your server installing Laravel Project

composer create-project laravel/laravel simplesendmaillaravel --prefer-dist

Step 2: Email Settings.

Laravel 5.6 the .env file

Host:	smtp.mailtrap.io
Port:	2525
Username:2sdf5dfds2fd5f	// some username
Password:sdf4f5d5f5d4fd	// some password
Auth:	PLAIN, LOGIN and CRAM-MD5
TLS:	Optional

Free Get Email mailtrap : User name and password

Step 3: Make Mailable class.

Go to Terminal >> run this commands

php artisan make:mail SendMailable

App\Mail\SendMailable.php
category = $category;
    }

    public function build()
    {
        return $this->view('emails.category');
    }
}

Step 4: Make a view Laravel file.

category.blade.php

<div>
<b>Welcome To Laravel 5.6 Sending Emails using SMTP Tutorial</b>
    Hi, This is : {{ $category }}
</div>

Step 5: Laravel 5.6 route to send an email.

routes >> web.php

Route::get('/send/email', '[email protected]');

CategoryController.php

// CategoryController.php

use Illuminate\Support\Facades\Mail;
use App\Mail\SendMailable;

public function mail()
{
   $category = 'Jaydeep';
   Mail::to('[email protected]')->send(new SendMailable($category));
   
   return 'Your Email was sent successfully';
}

Step 6: Run the Project.

php artisan serve

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 Laravel 5.6 – Send Email using Mail 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.

PHP sleep delay Function increasing execution time 0

PHP sleep delay Function increasing execution time

Today, We want to share with you PHP sleep delay Function increasing execution time.In this post we will show you Php, wait 5 seconds before executing an action, hear for jQuery delay Effects with Animation Example we will give you demo and example for implement.In this post, we will learn about Adding delay to the script execution time in PHP by using PHP sleep function with an example.

PHP sleep delay Function increasing execution time

There are the Following The simple About PHP sleep delay Function increasing execution time Full Information With Example and source code.

As I will cover this Post with live Working example to develop Delay, sleep, pause, wait etc in PHP, so the delay(sleep) a PHP function call using PHP for this example is following below.

PHP sleep() Function

The PHP sleep() methods delays some execution of the active script for a (delay)specified number of seconds.

Syntax

sleep(seconds)

Using PHP sleep to add some times delay or increase your script execution time

sleep(25);

The above PHP command will make a PHP delay of 25 seconds, the next process of script execution will be after the some delay of 25 seconds.

Simple PHP sleep delay Examples

Let us print some time the time after a delay(sleep) a PHP function call using PHP of 15 seconds.

<?php
echo date('H:i:s');
sleep(15);
flush();
echo "<br>";
echo date('H:i:s');
?>

Out of the two Simple php sleepoutpus , second one will return display after 15 secs

12:22:19
--------------
12:22:34

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 sleep delay Function increasing execution time.
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.

Fetch Last week month year records in MySQL 0

Fetch Last week month year records in MySQL

Today, We want to share with you Fetch Last week month year records in MySQL.In this post we will show you How to fetch this week records in MySql ?, hear for SELECT IN MYSQL CURRENT DAY, CURRENT WEEK, LAST WEEK we will give you demo and example for implement.In this post, we will learn about Last one week, month, year record from date field by DATE_SUB with an example.

Fetch Last week month year records in MySQL

There are the Following The simple About Fetch Last week month year records in MySQL Full Information With Example and source code.

As I will cover this Post with live Working example to develop Laravel Get Last 7 days month year record from MySQL, so the get this week records mysql,fetch current week records mysql for this example is following below.

If We require to get all the MySQL Database records of current week using mysql query. for example We have one SQL table “products” as well as all the columns are product_id, product_title, product_description, created_at as well as update_at timestemp, And then We need to fetch all records of this week. therefor We can fetch all the fields value using DATE_SUB and INTERVAL of simple mysql Table. In following simple example We can display how to MySQL select data of fetch current week.

SELECT * FROM products WHERE created_at > DATE_SUB(NOW(), INTERVAL 1 WEEK);

Last 10 days records

select * from products where  `date` >= DATE_SUB(CURDATE(), INTERVAL 10 DAY)

DATE_SUB() Fetch the recent one month or year records from PHP MySQL table

SELECT DATE_SUB(  '2019-12-25', INTERVAL 3 DAY )

Present Month Records

SELECT * FROM `products` WHERE  date between  DATE_FORMAT(CURDATE() ,'%Y-%m-01') AND CURDATE()

Present Year Records

SELECT * FROM `products` WHERE  date between  DATE_FORMAT(CURDATE() ,'%Y-01-01') AND CURDATE()

Last one month records

select * from products where  `date` >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH)

Records of two date ranges

select * from products where `date` BETWEEN DATE_SUB( CURDATE( ) ,INTERVAL 3 MONTH ) AND DATE_SUB( CURDATE( ) ,INTERVAL 0 MONTH )

Fetch records between 6 month and 12 month

select * from products where `date` BETWEEN DATE_SUB( CURDATE( ) ,INTERVAL 12  MONTH ) AND DATE_SUB( CURDATE( ) ,INTERVAL 6 MONTH )

MYSQL CURRENT DAY

SELECT IN MYSQL CURRENT DAY, CURRENT WEEK, LAST WEEK

Selecting MySQL records for the current day:

SELECT *
FROM (`products`)
WHERE date = CURDATE()  

MYSQL CURRENT week

SELECT IN MYSQL CURRENT DAY, CURRENT WEEK, LAST WEEK

Selecting MySQL records for the current week:

SELECT SUM(o_price) price
FROM (`orders`)
WHERE YEARWEEK(`o_date`) = YEARWEEK(CURDATE()) 

MYSQL CURRENT week

SELECT IN MYSQL CURRENT DAY, CURRENT WEEK, LAST WEEK

Selecting MySQL records for the current week:

SELECT *
FROM (
`products`
)
WHERE YEARWEEK( `date` ) = YEARWEEK( CURDATE( ) + INTERVAL 1 WEEK )
LIMIT 0 , 30

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 Fetch Last week month year records in MySQL.
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 Eloquent query where exists MySQL 0

Laravel Eloquent query where exists

Today, We want to share with you Laravel Eloquent query where exists.In this post we will show you Laravel 5 query builder where exists example, hear for Check If A Database Table Exists With Laravel we will give you demo and example for implement.In this post, we will learn about Laravel Advance Database Query Builder with an example.

Laravel Eloquent query where exists

There are the Following The simple About Laravel Eloquent query where exists Full Information With Example and source code.

As I will cover this Post with live Working example to develop PHP SQL exists in Laravel 5 query builder, so the Laravel Eloquent – WhereNotExists for this example is following below.

We use simple Code PHP sql where exists clause in check laravel. whereExists through We can use Database in sql where exists clause in Latest version of the laravel Web project. It is simple and very easy to use as well as We can best way to implements and undestand. We can give simple fire SELECT statment in where some condition. We can see bellow source code with example as well as We can learn how to use simple whereExists in your Laravel app.

Simple SQL Query

SELECT *
FROM `products`
WHERE EXISTS
    (SELECT `products_cat`.`id`
     FROM `products_cat`
     WHERE products_cat.cat_id = products.id)

MySQL Using Laravel Query Builder

DB::table('products')
    ->whereExists(function ($query) {
        $query->select("products_cat.id")
              ->from('products_cat')
              ->whereRaw('products_cat.cat_id = products.id');
    })
    ->get();

Example 2: SQL exists in Laravel 5 query builder

$product = Products::whereNotExists(function ($query) use ($id_merchant) {
	$query->select(DB::raw(1))
		  ->from('merchant_poeni')
		  ->where('product.id', '=', 'a.id')
		  ->where('product_id', '=', $id_merchant);
})
->orderBy('created_at')
->first();

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 Eloquent query where exists.
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.

Chosen Ajax Autocomplete Textbox using jQuery, PHP 0

Chosen Ajax Autocomplete Textbox using jQuery, PHP and MySQL

Today, We want to share with you Chosen Ajax Autocomplete Textbox using jQuery, PHP and MySQL.In this post we will show you Autocomplete Textbox using jQuery, PHP and MySQLi, hear for Ajax PHP MySQL Creating Autocomplete Search Suggestion we will give you demo and example for implement.In this post, we will learn about PHP Autocomplete Input tags with Dynamic Data using jquery Ajax
with an example.

Chosen Ajax Autocomplete Textbox using jQuery, PHP and MySQL

There are the Following The simple About Chosen Ajax Autocomplete Textbox using jQuery, PHP and MySQL Full Information With Example and source code.

As I will cover this Post with live Working example to develop Jquery Chosen plugin – dynamically populate list by Ajax, so the PHP – Jquery Chosen Ajax Autocomplete for this example is following below.

Step 1: Make a MySQL Database Table

Lest start, I want to make MySQL database and table, therefor here i made “products” database and “products” table with product id as well as product name column. We can simply make MySQL “products” table as following simple sql query.

SQL Query:

CREATE TABLE IF NOT EXISTS `products` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=24 ;

Step 2: Make index.php

Now, I want to make simple root PHP index.php file as well as i made form with one HTML input text box using jquery chosen. I also some easy source code for multiple add more fields in jquery examples. therefor let’s make simple index.php file and put some bellow source code.

index.php

<!DOCTYPE html>
<html>
<head>
  <title>jQuery Chosen autocomplete with PHP and AJAX - pakainfo.com</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" />

 
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.8.7/chosen.css" />
  <script src="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.8.7/chosen.jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
</head>
<body>

<h1>jQuery Chosen autocomplete with PHP and AJAX</h1> 
<div class="container pakainfo">
  <div class="pakainfo panel panel-primary">
    <div class="panel-heading">jQuery Chosen autocomplete with PHP and AJAX - pakainfo.com</div>
    <div class="panel-body pakainfo">
      <form>
        <select class="form-control pakainfo select-box">
          <option>Select Products</option>
        </select>
      </form>
    </div>
  </div>
</div>
 
<script type="text/javascript">
  $(".select-box").chosen();
 
  $('.chosen-search input').autocomplete({
    source: function( request, response ) {
      $.ajax({
        url: "request_ajax.php?name="+request.term,
        dataType: "json",
        success: function( data ) {
          $('.select-box').empty();
          response( $.map( data, function( product ) {
            $('.select-box').append('<option value="'+product.id+'">' + product.name + '</option>');
          }));
          $(".select-box").trigger("chosen:updated");
        }
      });
    }
  });
</script>
 
</body>
</html>

Step 3: Create request_ajax.php File

In this Last step, I shall simple source code for fetching PHP jquery ajax data from MySQL database using simple mysql query. Therefor We have to make a simple request_ajax.php and put bellow some source code:

request_ajax.php

<?php
    
    $hostName = "localhost";
    $username = "root";
    $password = "jaydeepGondaliya";
    $dbname = "products";
 
    $mysqli = new mysqli($hostName, $username, $password, $dbname); 
    $sql = "SELECT * FROM products WHERE name LIKE '%".$_GET['name']."%'"; 
    $all_result = $mysqli->query($sql);
 
    $data_response = [];
    while($row = mysqli_fetch_assoc($all_result)){
       $data_response[] = array("id"=>$row['id'], "name"=>$row['name']);
    } 
    echo json_encode($data_response);
 
?>

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 Chosen Ajax Autocomplete Textbox using jQuery, PHP and MySQL.
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.