$calling_page = $_SERVER['HTTP_REFERER'];Notice that its spelt wrong. Should be "referrer" instead of "referer". Oh well, that's the way it is now.
Programming Tips - PHP: get the URL of the calling page
Date: 2008nov5
Language: php
Q. PHP: get the URL of the calling page
A. Like this: