Re: Using variables from includes
| From: | chris sherwood | Date: | Tue, 24 Jun 2003 21:44:54 +0000 |
| Subject: | Re: Using variables from includes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-152859@lists.php.net to get a copy of this message | ||
use globals to pass the information to other pages..
http://www.php.net/manual/en/language.variables.php
"Ben" <webmaster@theblt.com> wrote in message
news:<20030624212242.97454.qmail@pb1.pair.com>...
> 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??
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>