if (isset($_SERVER['HTTP_REFERER'])) {
print "The page you were on previously was {$_SERVER['HTTP_REFERER']}
";
} else {
Print "You didn't click any links to get here
";
}
?>
Click me!