Hi.
The session_register() function takes the name of the variable as a parameter, in PHP, the $ sign is simply to denote that "here comes a variable". The string after the $ sign is the name of your variable, thus leaving the error in your code snippet being:
session_register('$name');
which should read:
session_register('name');
Hope that helped :-)