I am pleased to announce my latest CodeIgniter Spark, MessageCI. MessageCI is quite possibly the simplest messaging library currently available for CodeIgniter. It makes no assumptions about your ORM or database code, application themes, CSS, views, models or anything else. It simply gets out of your way to you can get down to business.
Set a Message
Detect an event to which you want to alert the user. For this example, we will assume a form has been POSTed and form validation failed.
// Form validation failed...
if( ! $this->form_validation->run())
$errors = $this->form_validation->error_array();
foreach($errors as $error)
// Redirect to some page to show the error message
Display a Message
Display a message to the user in a view. CSS styles are configured via the config file to decouple logic from presentation. If there are no messages set, nothing happens, so you can safely embed this code in every view without worrying about detecting messages.