Category: CodeIgniter

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

AJAX pagination makes it easier to display the large list of records in multiple pages without refreshing the whole page when navigating.

While navigating pages if you refreshed the webpage then it will load record from 1st instead of page position before the refresh.

E.g. If you are on 5 page then it will again start from 1 when webpage reload.

To retain the position, I am using COOKIE to store the page number and use it after page successfully load to fetch records in CodeIgniter.

Retain AJAX pagination position after Refresh in CodeIgniter

AJAX CodeIgniter DataBase PHP

CodeIgniter displays a simple 404 error page whenever the user navigates to a broken link.

You can easily customize it and make more user-friendly for the user.

In this tutorial, I show how you can create custom 404 error page in CodeIgniter.

Create custom 404 error page in CodeIgniter

CodeIgniter PHP

TinyMCE is a WYSIWYG editor which enables HTML textarea or other HTML elements to accept formatted input and media files.

It previews the content while adding and editing.

In this tutorial, I show how you can add TinyMCE editor to HTML control and read it on the form submit in CodeIgniter Project.

Add TinyMCE to HTML element in CodeIgniter

CodeIgniter JQuery PHP

CodeIgniter has upload library which makes easier to handle file uploading.

Sometimes need to allow multiple files upload to the web application. This can easily add by separately creating file element for selection.

But this can handle with single file element by adding multiple attribute.

Need to loop on selected files for upload.

In this tutorial, I show how you can upload multiple files in CodeIgniter.

How to upload Multiple Files and Images in CodeIgniter

CodeIgniter PHP

AJAX based pagination load content without reloading the whole webpage and improve the user experience.

CodeIgniter has the pagination library to add pagination.

From the controller need to handle the AJAX request which sends from the view.

In this tutorial, I show how you can create AJAX pagination in CodeIgniter.

How to Create AJAX Pagination in CodeIgniter

AJAX CodeIgniter DataBase How To JQuery PHP