You have to declare some variabels as globals to be able to reach them from a function. If you don't do that, then you won't be able to get them.
register_globals is another thing. This makes that all the values that is stored in the $POST, $GET etc. will be able to get with a simple name. If you want to get the referer of a page, then you usually has to use $_SERVER['HTTP_REFERER'];, but if you have register_globals on, then you can just use $HTTP_REFERER;. But there is something negative about this, and that is that you can "trick" your scripts with it...