How magento save value in session?

Share:
if you want to save "Test value" in "SessionMessage" variable

$sessionValue = 'Test Value';
Mage::getSingleton('core/session')->setSessionMessage($inputMessage);

If you want to read value form "SessionMessage"

$outputMessage = Mage::getSingleton('core/session')->getSessionMessage();
echo $this->__($outputMessage);

No comments

Ads