Forum Moderators: coopster
Apart from using meta redirect and java go.back is this possible with php
I don't think i can use header (location mysite/pages.php?a=1&b=2) as it would be a dynamic link .or can i
from current process.php i want to send the user to previous page which is of the format mysite/pages.php?a=1&b=2 (has 2-3 GET parts)
One way to avoid using relative urls is is to create a config script that defines the basic site url, as such:
define("SITE_URL", "http://www.example.com/mysite/");
And use it as such:
header("Location: <?php print SITE_URL?>pages.php?a=1&b=2");
Of course you have to include the config script first. But at least you have to make only one relative url.
But this is only how I would do this.
This is probably the best way to get the job done. This is what is used for sites such as login sites where a visitor might visit a page but they must login first, so they are redirected to the login page, login, and then redirected to the page that they originally visited. The referrer is good for this sort of thing :)