Reply to Re: problem with globals (?)

Your name:

Reply:


Posted by lorento on 10/20/07 11:51

before you call function NotPriviledged,
have you assign a value to $GLOBALS['pagetitle'] ?

this global variable might be empty because you only declare $pagetitle
not the global variable. The $pagetitle value is not accessible from
NotPriveledged function.

--
http://blog.deshot.com
http://www.groupvita.com


frizzle wrote:
> Hi there,
>
> I have a center-file index.php
> in it various files are included: inc/config.php, inc/functions.php
>
> in config.php $pagetitle is declared.
> if i call Header(), located in functions.php, it builds the header
> part:
> <html> thrue to <body> (by including header.php)
> the pagetitle is reffered to as $GLOBALS['pagetitle'] and that works.
>
> i also have a function in functions.php called NotPriviledged( $title,
> $meta, $java )
> It returns
> Header();
> echo 'You are not priviledged to view this page.';
> Footer();
>
> $title is meant for an additional pagetitle, $meta for additional
> meta-tags, and java for additional javascripts.
>
> Somehow, i'm unable to get the variables inside Header() (/header.php)
> by calling NotPriviledged.
>
> How do i get them in there?
>
> Frizzle.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация