You can set flash data in controller just using this syntax
$this->session->set_flashdata('message', 'Message you want to set');
Here 'message' is identifier for access data in view. You can Set more than one message by just changing identifier.
for ex
$this->session->set_flashdata('my_alert', 'Message you want to set');
$this->session->set_flashdata('my_warnig', 'Message you want to set');