This works for me, PHP 4.1.1 Upon first loading the page, I get nothing, but when I click on "go", I get both referrer address' echoed.
refer.php: --- <html> <body> <A HREF="refer.php">go</a><BR><BR> Page refered by <?php echo $HTTP_REFERER.'<br>'; echo $_SERVER['HTTP_REFERER'].'<br>'; ?> </body> </html> --- It's already been said but: 1. are you sure php is working (with other files, and with simple echo "hello world!"; type stuff)? 2. use this file (phpinfo.php) to test for the existence of HTTP_REFERER: refer.php: --- <html> <body> <A HREF="refer.php">go</a><BR><BR> Page refered by <?php echo $HTTP_REFERER.'<br>'; echo $_SERVER['HTTP_REFERER'].'<br>'; ?> </body> </html> --- Upon first loading, it will not be set, but when you click go, you have a referer, and it is set. For me, it's listed under the Apache Environment heading. If you still can't get a referrer var after all that, then there's an issue with your server (are you using apache????) or perhaps the client (browser). because it *should* be simple. Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php