So, suppose I have a php file named A like this:
<?php
$_SESSION["Ad gloriam"] = "La musique donne une âme à nos coeurs et des ailes à la pensée.";
?>
    <h4> Hello, everything goes OK<h4>
    <h4> The $_SESSION["Ad gloriam"] = <?php
        echo ($_SESSION["Ad gloriam"]);
    ?></h4>
<script src="/php2.php">
</script>
The result looks to something like this:
Now, suppose we have a /php2.php file witch I have load in A:
<?php
    echo ("console.log ('".$_SESSION["Ad gloriam"]."');");
    echo ("console.log ('Si la vertu ne suffit pas à assurer le bonheur, la méchanceté suffit à rendre malheureux.');");
?>
Normally, the script will be execute when I load A and I will see in the console:
- La musique donne une âme à nos coeurs et des ailes à la pensée.(=> from- $_SESSION["Ad gloriam"]);
- Si la vertu ne suffit pas à assurer le bonheur, la méchanceté suffit à rendre malheureux.(=> a test).
However, $_SESSION["Ad gloriam"] returns nothing and I do not see anything in the console.
What did I wrong?
I do not find anything about the subject in the web. Maybe, I do not achieve to put a name on this error.
NOTE: My title is, maybe, not very clear. Tell me a better title in the comments if you find one, please.
Tell me if you have some questions.

 
    