$msfbwall_user_session = JFactory::getSession(); // main call
$msfbwall_user_session->set('msfb_session_itemid',$_REQUEST['Itemid']);
here i saved current menu item id in a session variable "msfb_session_itemid"
2. how to check session var exists and get stored value ? see here -
if(($msfbwall_user_session->get('msfb_session_itemid')!=NULL)) //session not null
{
$msfb_mod= $msfbwall_user_session->get('msfb_session_itemid');
}
3. how to destroy a stored session value ? this way -
$msfbwall_user_session->clear('msfb_session_itemid');
this will remove the value stored in session variable "msfb_session_itemid"
hope it helps a lot.Dont forget to like and share it.