What you want is quite simple.
Create a file possibly called "common.inc" or something and put it somewhere above your web root.
In "common.inc" do:
<?
// some example of a global site variable
define('CONST_DB_USERNAME', 'somename');
?>
Then in your pages you can
<?
require '/path/to/common.inc';
// Here, you constants will be available
print "<p>" . CONST_DB_USERNAME;
?>
If you think about it, you can add all sorts of global site variables and constants to your common file. You don't have to and shouldn't define common values more than once in your site. (That's bad programming practice)
Also, consider the auto_append_file setting in your .htaccess files so that your common file is automatically appended to every php file on your site. Search php.net for details on this and more.
Matt.