Two things:

The undefined notice you are getting is the result of your error_reporting
setting in your php.ini...
http://www.php.net/manual/en/function.error-reporting.php

What is ultimately causing the error is that not all HTTP requests to your
page have a referrer defined, therefore, on the occasions that the client
did not specify the referrer, you are getting the undefined notice because
it did not exist.  You can test this my having a page that echoes out the
HTTP_REFERRER variable and also contains a link to itself....I think you
will catch on when you see it in action.

<?php
  echo 'Referrer: '.$_SERVER['HTTP_REFERRER'];
  echo '<br><a href="'. $PHP_SELF .'">Link</a>';
?>

> -----Original Message-----
> From: R.S. Herhuth [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, July 03, 2002 5:32 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] HTTP_REFERER
> 
> 
> 
> I have looked at several stats gathering code blocks and they 
> use $HTTP_REFERER.  When I use that I get and undefined 
> variable error.  I also tried 
> $HTTP_SERVER_VARS["HTTP_REFERER"] which gets me an undefined 
> index error.  I also tried $HTTP_SERVER_VARS["REFERER"] which 
> generates the undefined index error.
> 
> What should I be using???
> 
> 
> Ron
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to