Fatal error: Cannot redeclare class – Error message in codeigniter

By | May 23, 2014

class Usernamevalidation extends CI_Controller{

if you use the same name for modelfile and modle class it will throw this error message like below

Class Usernamevalidation extends CI_Model
{

so please use separate class name for both model and controllers.

Click to see the Demo

Click here to see the detailed code and demo