Jump to content

Sending the page URL to another page


Mark H

Recommended Posts

I am not fully versant with PHP...especially the functions.Should I be looking at the various functions in order to send the referring URL to another page, in order that the target page may then refer the user back to the original page? Much like this forum does when you sign in.Would this be the right approach, or would a browser script such as javascript be better?Mark.

Link to comment
Share on other sites

you can use $_SERVER['HTTP_REFERER'] to get the refer URLand the header("location:somepage.php") to redirect. http://php.net/function.headerjavascript can be blocked by user i think doing it with php is more reliable and effective.

Link to comment
Share on other sites

Thank you.I have had a look at the php link you gave...I'm unsure how I can create a "pause" before the redirect. Will this be simply another function?I keep going through the PHP tutorial, but my forgetfulness........I can't remember if it is possible to pause the execution of a function.What I require is for the page to load, then pause, then after, say 5 seconds, redirect to the referring page.Thanks, :)

Link to comment
Share on other sites

you can use meta tag to redirect orheader("refresh:5;url=http://mysite.com);refresh represents the time delay in seconds

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...