The situation is this: On a page written in php, a link is displayed, for example, http://usd-rabota.com/?id=46118, and I need that id be automatically substituted on html pages, for example, http://holdingsilver.com?referal=46118 Those. redirected to another site, but the id is saved from the first link. Help please, I am a complete layman, but I really want to understand how this can be done.
If I understand you correctly, then if you follow the link http://usd-rabota.com/?id=46118, then on the side where you go you intercept the GET request with the variable id and its value 46118 and form the link.
$id = $_GET["id"]; echo "<a href='http://holdingsilver.com?referal=".$id."'>";
You can also use the php session mechanism if there is a lot of data