Makitweb Posts

Star rating bar gives an option to the user to submit his thoughts whether the content is good or not. This gives the administrator a view how well its item is performing.

It is very common on the e-commerce websites.

In this tutorial, I am using jQuery Bar Rating plugin to display star rating on the screen. Whenever the user changes the rating then send an AJAX request to save the user currently rating status on the MySQL database table with PHP.

5 Star Rating system with jQuery, AJAX, and PHP

AJAX Jquery PHP

The Codeigniter allows us to perform the database action like – select, insert, update, and delete with the minimal script.

The $this->db->update() method is used for update existing record. It takes table name and an array or object as the parameter.

In the demonstration, I am listing the user’s list with the edit option. Show the update form on edit option click.

Update records in Database Table with CodeIgniter

DataBase PHP

You can use jQuery AJAX to autocomplete data on the single or multiple elements when the user search or select value from an element.

It is a better way to allow the users to easily search for data in existing records and get required information e.g. get student details by its id, product details, etc.

In the demonstration, I am using jQuery UI to display suggestion list and fetch details using PHP from the MySQL database table when a value from the suggestion list is gets selected.

How to autocomplete data on multiple fields with jQuery and AJAX

AJAX Jquery PHP

File Transfer plugin allows to upload photo or files to the remote server from the PhoneGap app.

In this tutorial, I am using Camera plugin to take a photo from camera or gallery. It will return response either in base64 format or path. You can use jQuery AJAX to upload photo in base64 format.

But it is not the better way because it works well when the image quality is low but when the image is taken from better camera device or photo quality is good then it increases the image size and takes a longer time to process, crash the app, slow down the device.

While adding File transfer plugin it will automatically download File plugin also that use to manipulate files in the device.

In the demonstration, I am creating a basic app where upload the selected photo to the server.

Capture and Upload photo to server with PhoneGap

Phonegap

Require using device camera to allow the users to change or upload their image from the app either by taking a photo with the camera or choose from the photo gallery.

With camera plugin, you can access device camera to capture a picture and select existing photos from the device gallery.

It gives a response in the base64 format or path on the successful callback that can use in image source to show the preview of selected photo or save it to the server.

In this tutorial, I show how you can implement the plugin in your project and select photo with it.

Choose an image from camera or gallery - PhoneGap

Phonegap

QR code is quick response code that has large storage capacity. It is consist of black and white square box that can be read using smartphones or dedicated QR reading devices to gain access to additional information.

This can be used for advertisement, storing web site URL, information, etc.

In this tutorial, I am using the jquery.qrcode.js plugin to generate custom QR code and embed on the web page.

You can adjust its size, background and foreground color with options.

Add QR code to the webpage with jquery.qrcode.js

Jquery

CodeIgniter have an inbuilt upload library that allows to upload file.  You can specify various preference like – destination path, valid file types, max file size, etc.

In this tutorial, I create a simple example to demonstrate file uploading in CodeIgniter.

How to upload file in CodeIgniter

PHP

If you know how to send jQuery AJAX request in Core PHP then it is simpler for you to do it in CodeIgniter.

In CodeIgniter, you can use the controller and model to handle AJAX call instead of creating the separate file. Make AJAX call either from the view or external script file.

In this tutorial, I am creating a simple example to demonstrate the AJAX calling in CodeIgniter.

How to Send AJAX Request In CodeIgniter

AJAX Jquery PHP

Load more pagination allows the users to load new content on a button click. This appends new content with existing contents.

It is the type of infinite pagination where the user has to click the action button to view new records. This load data until records are available.

In this tutorial, I am implementing this functionality on a page with AngularJS and PHP.

Load more pagination with AngularJS and PHP

AJAX AngularJS PHP

Data storing is a basic requirement while creating an application.

It is possible to store data online but the app needs to be online whenever data processing is required.

For local data storage use SQLite database which is already embedded on the mobile platforms – Android, IOS, Windows, Blackberry, etc.

The Cordova plugin provides support to access SQLite database in the app.

In this tutorial, I am creating an Android app where use SQLite database to save and retrieve records. Deploy the application with PhoneGap Build.

Storing Data Locally in a PhoneGap App with SQLite

DataBase Phonegap