while using set_flashdata() function, if it will throw below error as follows
“In order to use the Session class you are required to set an encryption key in your config file”
In this condition we have to set $config[‘encryption_key’] =” in the config.php file
flash data will work fine if you set the encryption_key.