Goal: I have two PHP-Files in which i want to store data in a COOKIE set by the site "INDEX.PHP" and pass it over to a site called "LAST.PHP". In the middle there is an external site which will be called in which i have no influence in passing over any variables. The Sourcecodes of the files are the following:
INDEX.PHP
<?php
$cookie_name = "test";
$cookie_value = "It works!";
setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/");
?>
LAST.PHP
<?php
echo $_COOKIE['test'];
?>
As you can see i kept it as basic at possible. I simply want to create a COOKIE in the "INDEX.PHP", then i will be redirected to an external site, and this external site is finally redirecting me to "LAST.PHP" in which i just want to output the COOKIE. This is just not working for me right now, can anyone help me out with that? If anyone has suggestions for a more elegant way to transport data from "INDEX.PHP" to "LAST.PHP" that would be much appreciated also, please just keep in mind that i have no influence on the "EXT. SITE". Thank you very much in advance.