Re: Does not work

From: Date: Sun, 14 Jul 2002 20:27:26 +0000
Subject: Re: Does not work
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-107635@lists.php.net to get a copy of this message
In article <20020714191048.16794.qmail@pb1.pair.com>, nospam@bol.com.br (Saci) wrote: > I tried this simple code > > <html> > <body> > Page refered by > <?php > echo $HTTP_REFERER.'<br>'; > echo $_SERVER['HTTP_REFERER'].'<br>'; > ?> > </body> > </html> > > and I receive blank reply even if referenced from a link from other site. > > What am i doing wrong ? Or perhaps my server does not have referer enabled? It's possible that your *browser* does not pass referer information. But keep in mind that if there was no referring page, then there is no referer value for the browser to set. Try this instead: <html> <body> <form method="get"> Page refered by <?php echo $HTTP_REFERER.'<br>'; echo $_SERVER['HTTP_REFERER'].'<br>'; ?> <input type="submit> </form> </body> </html> Load it, check the value, click "Submit", then check again. -- CC

« previous php.general (#107635) next »