you can set by setter and get by better method of magento like:
Mage::getSingleton('core/session')->setSessionVariable($jyoti); $sessionVariable = Mage::getSingleton('core/session')->getSessionVariable(); echo $sessionVariable;
This depend upon the session fro which you are like to save you value into variable like :
Mage::getSingleton('core/session')->setSessionVariable(); Mage::getSingleton('customer/session')->setSessionVariable(); Mage::getSingleton('adminhtml/session')->setSessionVariable();
For core session or admin or customer session.By the above code you set and get session value.
For more details please check the below link
Handel Magento session