Jump to content

header and footer includes won't return variables


madchops

Recommended Posts

I have a problem which I cannot figure out since the code works fine in all the other sites I have built. Even on test sites on the same server.

Rundown:

I have a modulated site and for an example I echo the variable $valid, which has a value of the member's id, and the vaiable $domain, which has a value of the site domain location (ex. etwdesign.com/airtaxijuice).


These variables are echoed right before the header include as such:
--------------------------------------------------------------------------
<?
$domain = $_SESSION['domain'];
$valid = $_SESSION['valid'];
echo "Valid: $valid ";
echo "Domain: $domain ";

include ("http://www.".$_SESSION['valid']."/includes/header.php");
?>
--------------------------------------------------------------------------


Then in the header on the very first line I echo the same vairables as such:
--------------------------------------------------------------------------
<?
echo "Valid: $valid";
echo "Domain: $domain";
?>
--------------------------------------------------------------------------

For some reason when it parses the echos before the header include echo fine.  But the variable in the header don't come through.  This prevents me from using "if" statements and other things within the header or footer includes.  I have done this successfully in the past and I cannot for the life of me figure this out.  If anyone has any ideas let me know.

View the example at
[url=http://www.etwdesign.com/airtaxijuice/register.php]http://www.etwdesign.com/airtaxijuice/register.php[/url]
the valid variable will be empty unless you fill out the registration form, but the domain variable should always have the value of etwdesign.com/airtaxijuice

I will appreciate any suggestions.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.