Quick Autocomplete App With PHP and JQUERY MOBILE

In this simple project, we will create a simple web app that searches data from a MYSQL database using PHP and Jquery Mobile listview widget.

Watch Video:
what is jQuery Mobile?

jQuery Mobile is a HTML5-based user interface system designed to make responsive web sites and apps that are accessible on all smartphone, tablet and desktop devices.

How is jQuery Mobile and Php used in this project?

With the help of jQuery Mobile, we make use of a listview widget which is coded as a simple unordered list (ul) or ordered list (ol) with a data-role="listview" attribute.

Then php is used to connect and fetch data from a database with the help of structed query language(SQL).

How the folder structure looks like.

The folder you will download below contains the following files and sub-folders.

  • config(sub-folder)
    • db_con.php
  • autocomplete.sql(import this to your database)
  • index.php
Sneek preview of how the db_con.php file looks like.
copy

<?php 

//change to your server name
$Server_Name = "localhost";

//change to your server user name
$Server_User ="root";

//change to your server password if there is any.
$Server_Pass = "";

//change to your database name
$Db_name ="autocomplete";

//This is dynamic - it will connect basing on the information provided above
$con = mysqli_connect($Server_Name,$Server_User,$Server_Pass,$Db_name);

if(!$con){
	//This will be displayed incase of connection failure.
	echo "Failed to connect to server";
	exit();
}

?>

To download the source code: Click here description

collections_bookmark Category :: Php
date_range Published :: 3 months ago At: 05:57 PM
person Writer :: Code

YOU MAY LIKE THESE POSTS