Hello Guys,
If you are looking to set flash messages in Zend framework please follow the below process::
1) Open your controller and set below line under init()
$this->_flashMessenger = $this->_helper->getHelper('FlashMessenger'); // Define under inti function
2) Now you can set your message in your controller function
$this->_flashMessenger->addMessage(array('message' => 'You have successfully register.', 'status' => 'succMsg')); // Set your message here
$this->_redirect('/user/register'); //set your redirection here
3) Open your .phtml file, where you would like to display this message
echo $this->flashMessages(); //set this line under your html to display success msg
0 Comment(s)