Posts in Category: snippets

Sample Contact Form with validation, Captcha & Notification

Contact Controller

Contact_form.php – view


Captcha Helper




Read More

Random String Codeigniter

The first parameter specifies the type of string, the second parameter specifies the length. The following choices are available: alpha, alunum, numeric, nozero, unique, md5, encrypt and sha1

Read More

Codeigniter passing 2 arguments to callback – Email validation


Read More

CodeIgniter Pagination With Search Demo






Read More

Pagination With CodeIgniter

The Model

We’ll start by creating a model in the application which needs to do two things: provide a count of all the records in the Country table, and retrieve a list of countries from the table. Save the following as models/countries.php:

CodeIgniter’s database class with Active Record is

Read More

Delete Files and Execute Database Query remotely


Read More

Codeigniter Ajax Form Validation Example

  1. Create Controller

2. Create View File


Read More

Setting Error Messages

All of the native error messages are located in the following language file: system/language/english/form_validation_lang.php

To set your own global custom message for a rule, you can either extend/override the language file by creating your own inapplication/language/english/form_validation_lang.php (read more about this in the Language Class documentation), or use the following method:

If you need

Read More

Pagination with search functionality

set model this way

view look like this


Read More

Multi Level Nested Category System in Codeigniter and MySql

How to create Multi Level Category System in Codeigniter

This module is based on the recursive function concept. So let’s get started to develop multi level nested category system, carefully read below steps mentioned.

I am assuming that you are familiar with CodeIgniter’s MVC structure, so I’m not going to explain what model and controller

Read More