Yes, you're depending on register_globals being set to ON, automatically registering your POST'd elements as variables. This is a security risk, and bad coding, so you should never code using register_globals and, in fact, should take steps to ensure it is disabled.
Whichever variables are POST'd elements (i.e. elements in the HTML form), reference them using the $POST superglobal, i.e. $pass becomes $POST['pass'] and so on.
EDIT: For more information about these superglobals I'm speaking of visit this man page: [man]reserved.variables[/man] (specific link for the $_POST superglobal: [man]reserved.variables#reserved.variables.post[/man]).