session_name() function set the name of the session variable, default is 'SID'
This name is used when setting a cookie or passing the session ID through the URL.
So your code above is not setting any variables.
First you must start the session with
session_start();
Then to register a variable you would do:
session_register("myvar");
Note: myvar is the name of the variable.
Example:
$myvar = "billybob";
session_register("myvar");
DO NOT do
session_register($myvar);
this will not work.
Once you register a session variable you can retrieve it through
$HTTP_SESSION_VARS
Example:
echo $HTTP_SESSION_VARS['myvar'];
would print: billybob
Hope this helps.