[eluser]InsiteFX[/eluser]
Use a MY_Controller
Save as ./application/core/MY_Controller.php
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Base_Controller extends CI_Controller {
/**
* -----------------------------------------------------------------------
* Class variables - public, private, protected and static.
* -----------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
/**
* __construct
*
* Class Constructor PHP 5+
*
* @access public
* @return void
*/
public function __construct()
{
parent::__construct();
}
// ----------------------------------------------------------------------
/**
* Index Page for this controller.
*
*/
public function index()
{
}
}
// ------------------------------------------------------------------------
/* End of file Base_Controller.php */
/* Location: ./application/core/MY_Controller.php */
Now extend your other controllers from this Base_Controller
You can create static variables that will retain there value.