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 Quote 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>"; ?> Quote 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 ! Quote Link to comment https://forums.phpfreaks.com/topic/53524-solved-last-address/#findComment-264534 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.