I have a Variable with a dinamic value inside.
My problem is, I can't patch this Variable anywhere when I change to another PHP file. I tried to register this Variable in a XML file, into the mysql data base, with constants, and nothing works, the value of my Variable will always reset.
Is there a way for me to freeze that variable value and use it later?
Thanks in advance.
PS: i looked for weeks in here and other places. Because im human I might have failed to realise hiden anwsers. If for some reason this is a duplicate please indicate the post, im very tired by now I might not be thinking strait.
EDIT:
The code is:
$actual_link = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
I recieve page1.php?id=51
Then I use $id = $_GET['id'];
To get the ID value (51)
And this is the value I would like to "freeze" to use in page2.php because if I navigate to page2.php the $id is gone.
$_GET['id']into a session variable. Once you get to page 2 you can just retrieve the value.