Getting the URL (from which the request was sent) on the server

Or else, how to make a request to one script, execute it, and then send the client the same page from which the request was made? Now I’m doing HTTP headers, but I don’t know how to specify the same page.

Answer 1, authority 100%



The $_SERVER['HTTP_REFERER']element contains the address of the page from which the visitor came to this page. The transition must be carried out by the link.