Show Error Message in frontend
$message = $this->__(‘Email Id Already Exist.’);
Mage::getSingleton(‘core/session’)->addError($message);
Show Success message in frontend
$message = $this->__(‘You have Register Successfully’);
Mage::getSingleton(‘core/session’)->addSuccess($message);
Show Error Message in Admin page
$message = $this->__(‘1 row has been updated successfully’);
Mage::getSingleton(‘adminhtml/session’)->addSuccess($message);
Show Success Message in Admin page
$message = $this->__(‘Email Id Already Exist.’);
Mage::getSingleton(adminhtml/session’)->addError($message);