OK.. forgive me, there are a couple similar questions posted already with the correct responses... I knew someday I would have to ask the people of the internet for help but I never thought it would be something so stupid...
here is my code.. so far..
index.php:
include "http://www.mywebsite.com/shared.php";
$page = "homepage";
include "http://www.mywebsite.com/htmlheader.php"; //trying to use "page" variable in here
echo ("<br>test2: " . $_SESSION['test']);
include "http://www.mywebsite.com/htmlfooter.php";
shared.php:
session_start();
$_SESSION['test'] = "what the f_ck im scared";
htmlheader.php:
echo ("test1: " . $page . "<br>" . $_SESSION['test']);
Output right now is:
test1:
test2:
(so the pages are being included.. just not able to use the variables..) From what I understand in its current state this should be printing something like:
test1: what the f_ck im scared
test2: homepagewhat the f_ck im scared
..The funny thing is I was not having any issue with the include using the variable. I had added some things but then it randomly stopped working so I reduced it down to this to try and figure out what the problem was.. I am assuming I have made some silly mistake.