I want to execute a script and go back to the page where it is accessed from.
In other words:
pagex->pagey (the script) do something->go back to pagex
How to do it?
I am rewriting my dynamic links to directory type URLs, if it makes a difference.
| SitePoint Sponsor |
I want to execute a script and go back to the page where it is accessed from.
In other words:
pagex->pagey (the script) do something->go back to pagex
How to do it?
I am rewriting my dynamic links to directory type URLs, if it makes a difference.
Trend Blocker blocks curiosity-clicks to Twitter trends | Open All Trends opens all Twitter trends in a new tab



Use a handler script, in other word use a form or hypertext link to access a page containing a script to execute. After processing use the header() to go wherever you want.
Computers and Fire ...
In the hands of the inexperienced or uneducated,
the results can be disastrous.
While the professional can tame, master even conquer.
But that depends on where I am coming from! Lets say I am at:use the header() to go wherever you want.
example.com/pagex.php?this=is_where_i_am
In that page I have a link to:
example.com/dosomething.php?with=this_query
So I click it and that's it. Now I want to go back to where I waswhich is:
example.com/pagex.php?this=is_where_i_am
This reminds me a well known quote lol:
Originally Posted by Lewis Caroll / Alice in Wonderland
Trend Blocker blocks curiosity-clicks to Twitter trends | Open All Trends opens all Twitter trends in a new tab



Use a hidden value in a form, use a session variable. There are any number of ways to capture and keep the referring URL.
Computers and Fire ...
In the hands of the inexperienced or uneducated,
the results can be disastrous.
While the professional can tame, master even conquer.
You can use $_SERVER['HTTP_REFERER'] to find out where you can from.
Bookmarks