Now, I'm catching hell, so someone please help and I'll dance at your wedding.
Here's the scenario:
I have my main page, which we'll call "main.php" for simplicity.
I also have a seperate file for my common variables, we'll call it "vary.php".
What I'm trying to do is include "vary.php" into "main.php" so that I can echo the variables in "main.php" but be able to change the "vary.php" file if need be.
So, lets say "vary.php" looks like this:
<?php $email="firstname.lastname@example.org"; $phone="555-555-5555"; $fax="555-555-5555"; ?>
Somewhere in "main.php" I try to call the $email variable like so:
<?php echo"Email:"; echo"$email"; ?>
However, it does not recognize the variable, and only shows "Email: "
Which tells me it's not reading my included "vary.php" file with the variables in it.
The way I tried to do it was just like the other files I have included, like so:
<?php include("http://www.mysite.com/php/pages/vary.php"); ?>
The other files on the "main.php" (such as "navigationbar.php" and "footer.php") work fine, but this one doesn't.
So, my question is, how do I include (or whatever function I need to use) in order to have a seperate file for my standard variables, and be able to echo them on the "main.php" file?
1 Cookie to the first person that can help.
Thanks in advance!