View Full Version : Return to entry page
mazer
03-16-2006, 09:59 AM
can anyone here tell me how to set up a dynamic link that will return you to the page you entered from?
mark87
03-16-2006, 11:34 AM
You could do something like this I think -
$ref = getenv('HTTP_REFERER');
echo '<a href="' . $ref . '">Referrer</a>';
mazer
03-16-2006, 01:20 PM
I just got a javascript to do the job, but thnks for the help
You could set a cookie and use it to track the "session", keeping a complete record of the pages on your site that a given user has visited. Then simply have your "dynamic link" reference the first one. With proper resetting of the cookie, of course, so that repeat visits with different entry points don't get confused.
glenmac
03-16-2006, 04:27 PM
a couple of ways
<script>function back(){
var bck = document.referrer;
location.href = bck;
}
</script>
<body >
<a href = # onClick="history.back()">back</a>
<a href = # onClick="back()">back2</a></body>
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.