HI,
If one web page in a folder or directory has an <a href ...> link to another web page in the same folder or directory can you still obtain the HTTP_REFERER ???

So if this is page one:
<html>
<head></head><body><center>
<a href="page2.php">Go to Page 2</a>
</center></body></html>

And this is page two - in the very same folder as page one:
<html>
<head></head><body><center>
<?
echo "The calling or referring page was: " . $_SERVER['HTTP_REFERER'];
</center></body></html>

-------------------------Then...............---------------------------------
What should I expect for the output of page two??? when I click on the link on page one?

Thanks,
I'm not getting anything??????


    do you ever close your ?> tag??
    you have...

    <?
    echo "The calling or referring page was: " . $_SERVER['HTTP_REFERER'];

    try adding a ?> before the rest of the html

      The HTTP_REFERER is a uncertain value as many browsers are set up not to forward it.
      Privacy issues, see?

      If you're doing this locally and want to know where the user has been, use a "middle" click-script to log where the user comes from.

      knutm :-)

        you could use sessions to track the user through your site:

        <?php
        session_start();
        if (!$_SESSION['REFERER'])
        {
        //do something if this is the page that is first accessed
        }
        else
        {
        //do something if the user is coming from your server
        }
        
        
        $_SESSION['REFERER'] =  $_SERVER['REQUEST_URI']; //or some other
        ?>
        
          Write a Reply...