How to use Twilio to send SMS with CodeIgniter

In this post, I would like to show using of Twilio library within your CodeIgniter 3 project. Twilio is cloud communications platform for building SMS, Voice & Messaging applications. Here are the steps to send SMS messages using Twilio APIs in the CodeIgniter 3 application: Step 1: Download and install CodeIgniter. Step 2: Run below… Continue reading How to use Twilio to send SMS with CodeIgniter

How to insert data into database with CodeIgniter

In this post, I will show inserting data into database table using CodeIgniter. We gonna use CodeIgniter Active Records Pattern. This pattern allows information to be retrieved, inserted, and updated in your database with minimal scripting. let’s download and install the CodeIgniter as a first step and set your database configuration details in application/config/database.php file,… Continue reading How to insert data into database with CodeIgniter

How to Enable CSRF (Cross Site Request Forgery) in CodeIgniter

In this post, I will show you enabling CSRF token in your CodeIgniter application. To enable CSRF (Cross Site Request Forgery) protection in CodeIgniter open application/config/config.php file change $config[‘csrf_protection’] = FALSE; to $config[‘csrf_protection’] = TRUE;, change below shown other configuration values of csrf as per your needs.

If you create a form (form_open()) using… Continue reading How to Enable CSRF (Cross Site Request Forgery) in CodeIgniter

Get CI’s object instance using get_instance() method

Get CI’s object instance using get_instance() method

In this post, I will show you how you can access the CI’s instance object within your custom classes. You can utilize all of CodeIgniter’s native resources using $this instance. But $this instance only works within your controllers, your models, and your views. If you would like to use CodeIgniter’s classes from within your own… Continue reading Get CI’s object instance using get_instance() method

How to create custom helper in CodeIgniter

How to create custom helper in CodeIgniter

In this tutorial, I would like to show creating custom helper in your CodeIgniter application. Helper functions are used to avoid repeated code in your controllers’and views, it encourages to follow good practice called DRY. You can call the helper methods in your views as well as in your controllers. You might like this post… Continue reading How to create custom helper in CodeIgniter

How to generate Excel using PhpSpreadsheet in CodeIgniter

How to generate Excel using PhpSpreadsheet in CodeIgniter

In this post, I would like to show using of PhpSpreadsheet library within your CodeIgniter 3 project. PhpSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Here is my another post, you might be interested in – How to use PHPExcel with CodeIgniter? Here are the steps to generate Excel in the… Continue reading How to generate Excel using PhpSpreadsheet in CodeIgniter

How to setup maintenance mode in CodeIgniter

How to setup maintenance mode in CodeIgniter

In this post, I will show you how easy it is to setup maintenance mode in CodeIgniter using CI’s hooks. while updating your web application its always better to show meaningful maintenance message to the end users, instead of showing errors. We gonna use CIs hooks to set up the maintenance page. Using hooks you… Continue reading How to setup maintenance mode in CodeIgniter

Cascading Dropdown List in CodeIgniter

In this post, I will show very simple and powerful approach to create cascading dropdowns in your CodeIgniter application. Cascading drop-down? A cascading dropdown list is a series of dependent dropdown list controls in which one dropdown list control depends on the parent or previous dropdown list controls. The items in the dropdown list control… Continue reading Cascading Dropdown List in CodeIgniter