I do not think that I am doing this the right way, but here goes it. I want to be able to have two php pages mypage.php
and mypage2.php
. mypage2.php
has plain text data on it (say a 8 digit number) and it is just being displayed via the echo
command.
I want to know if when I am on mypage.php
if I can grab that number and display it on mypage.php
rather than open up mypage2.php
and display it there?
So a hypothetical example of mypage.php
might be:
echo "My secret number is: " . magic_command("mypage2.php");
I know that one way to do this is with $_SESSION
, but doesn't that involve still navigationg to mypage2.php
, storing the number in $_SESSION
. Then telling it to go back to mypage.php
?