Hi,
I vaguely remember reading about this problem somewhere but can't find and info now. Ok this is my problem.
Session Variables are not valid when you 'include' a file with 'http:// .. ..' when it is a relative url, they work fine.
index.php
<?
session_start();
$_SESSION['username'] = 'chuck';
$username = $_SESSION['username'];
echo 'index username : ' . $username;
include('includetest.php');
?>
includetest.php
<?
session_start();
$username = $_SESSION['username'];
echo 'include username : ' . $username;
?>
Ok those work fine, but if i change index.php to this
<?
session_start();
$_SESSION['username'] = 'chuck';
$username = $_SESSION['username'];
echo 'index username : ' . $username;
include('http://blah.com/includetest.php');
?>
The Session Variables no longer are valid.
The reason I need to use 'http:// ......' is because i am building a template page which can be in any folder and I don't want to manually change all the relative links for each page, kinda defeats the template purpose.
Does anyone have any suggestions on how to go about fixing this or a better method for my templates?
Thanks,
Chuck