Category: CodeIgniter

One by One record deletion from the list is time-consuming and frustrating when need to delete many records.

With the use of the checkboxes on the list, you can allow selecting multiple records. Only required to add a single delete button.

In this tutorial, I show how you can delete multiple records using jQuery AJAX in CodeIgniter.

Delete multiple selected records with jQuery AJAX in CodeIgniter

CodeIgniter DataBase PHP

In CodeIgniter, there is zip library for creating a zip file but there is no library available for extracting the zip file.

To extract need to use ZipArchive Class.

Load the file and extract to a location using the ZipArchive Class object.

In this tutorial, I show how you can upload and extract a zip file to a specific location in CodeIgniter.

How to upload and extract Zip file in CodeIgniter

CodeIgniter PHP

In PHP, ZipArchive Class is used for creating a zip file.

For adding a whole directory files need to read directory files one by one and add in the ZipArchive Class object.

CodeIgniter already provided zip library which allows to either add files or a directory for Compress.

Need to load the zip library for using it.

In this tutorial, I show how you can create a zip file, download, and save it to the server with CodeIgniter.

Create and download zip file in CodeIgniter

CodeIgniter PHP

Nowadays mainly in every e-commerce websites, there is a rating option on the product page.

The user can rate the product based on its quality, usefulness, etc.

This rating is helpful for the other user who wants to purchase the product.

There are many jQuery plugins are available to add a rating bar on the page.

In this tutorial, I am using Bootstrap star rating plugin to create rating system in the CodeIgniter project.

Building a 5 star rating system in CodeIgniter

AJAX CodeIgniter PHP

In CodeIgniter, Model is used for the Database manipulation – fetch, insert, update, and delete records.

If within the project there are multiple Models are available then it may require to perform the action in a Model which is already created in another Model.

In this case, you can either create a separate function to perform the same action or use the already available method in the Model.

It is possible to reuse the method in the Model from another Model.

Models are loaded in the Model as same as loaded in the Controller using $this->load->model().

In this tutorial, I create 3 Models and call 1st and 2nd Model methods from the 3rd Model.

Call Model method from another Model in CodeIgniter

CodeIgniter PHP

CodeIgniter DataBase PHP

Dropzone is a JavaScript library which allows uploading file by drag’n’drop and display the file preview after upload.

It is easier to add to the page and it does not depend on any library like jQuery.

The file will upload to the server via AJAX.

In this tutorial, I show how you can use Dropzone library to upload the file in CodeIgniter.

Drag and Drop file upload with Dropzone in CodeIgniter

AJAX CodeIgniter Javascript PHP