There is a form. It is necessary to send along with all the data and URL page.
I transmit using this code:

http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI] 

But I have a link with parameters: site.com/form/index.html?ref=https://...
It also provides a link to the video from which there was a transition to this form, and this very necessary part is not transmitted. I only get the site.com/form link.

1 answer 1

Here is an example where everything is transmitted:

 <form action="/" method="POST"> <input type="hidden" name="url" value="http://<?php echo $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>"> <input type="submit" value="Submit"> </form> 

And then you get what you gave:

 $url = $_REQUEST['url'];