Using variables from includes

From: Date: Tue, 24 Jun 2003 21:22:50 +0000
Subject: Using variables from includes
Groups: php.general 
Request: Send a blank email to php-general+get-152664@lists.php.net to get a copy of this message
Ok, I'm sort of a beginner at this, so cut me some slack. :-) Ok, I have an if then statement that after you click a link it looks like this: blah?page=pagename It looks something like this: <?php if(!$page) { include ("http://www.site.com/home.php"); } else{ include ("http://www.site.com/" . "$page" . ".php"); } ?> This code is in the index.php file. When home.php is included, I want to echo a variable like $title on the index.php page. But $title is defined on home.php. For some reason, I can't get $title to echo on index.php after it's included. Anyone know??

« previous php.general (#152664) next »