Well, what's wrong with your code is that
$session_var seems to be defined in the function, so by default,
it's local (scope) to that function. It is unknown
outside of it, with or without the session_register() call.
"session_register()" is different from "global $session_var;"
for instance.
It's difficult to tell where to put things and in what order
since it depend of the rest of the code.
PS:
here you have a bigger (more detailed) tutorial :
[url]http://www.zend.com/zend/tut/session.php[/url]
Hervé.