yes, the set session variable behavior can be used outside of eCart (it is also included with the cookies toolkit extension)
If the session is not displaying, here things to check:
1) on any page that you are using a session value, you need to instantiate the session.
in other words, any page that you use:
<?php echo($_SESSION['sessionName']); ?>
to output the session value, you must include this code at line 1 to force PHP to "see" the session collection:
<?php if(!session_id()) session_start(); ?>
2) when using a recordset value in a session, double check the code order. make sure the recordset code is before the set session value code.