sheriff Posted May 30, 2007 Share Posted May 30, 2007 hi .. how can I make a back link, what contain the url of the page from where I come. thanks Link to comment https://forums.phpfreaks.com/topic/53524-solved-last-address/ Share on other sites More sharing options...
chigley Posted May 30, 2007 Share Posted May 30, 2007 You can do it in PHP... <?php if(isset($_SERVER["HTTP_REFERER"])) { $url = $_SERVER["HTTP_REFERER"]; echo "<a href=\"$url\">Go back!</a>"; } ?> ... but this is more reliable (provided that your visitors have JavaScript enabled): <?php echo "<a href=\"javascript:history.go(-1)\">Go back!</a>"; ?> Link to comment https://forums.phpfreaks.com/topic/53524-solved-last-address/#findComment-264525 Share on other sites More sharing options...
sheriff Posted May 30, 2007 Author Share Posted May 30, 2007 Thank you very much ! Link to comment https://forums.phpfreaks.com/topic/53524-solved-last-address/#findComment-264534 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.