Codeigniter flash message doesn’t work

1

When you working in the codeigniter, you want to send message or data from controller to view files.It can be done by using flash messages.But sometimes flash message doesn’t work.It is not displaying data.So I’m going to give the solutions to this issue.


First we’ll discuss how to normally display this message through the view file from the controller.
In the controller.

You can put own message name instead of the “flash_message” as following example.

In the view file.

You can get more information about the send and retrieve data using flash messages of my another post.

what are the reasons to not working the flash message?

1-Incorrect syntax

You can put custom names instead of the “set_flashdata”. Look at this example.

Solution

2-Sessions with database…
Using sessions with database may be caused.
In the application/config/config.php file.

Solution

Here is the recommend settings.

Share.

About Author

Sumith Harshan is the Web Engineer Specializes in Java Script, JQuery, HTML4/5, CSS2/3, PHP, CodeIgniter, CakePHP, J2SE, J2EE, XML, Hacking & Security, Mobile Interface Developing, Magento, Wordpress, Joomla, Drupal,PHPBB,Facebook App Developing and Open cart...etc.