You are here: Re: Self referencing « PHP Programming Language « IT news, forums, messages
Re: Self referencing

Posted by Andy Jeffries on 10/10/03 11:46

On Fri, 28 Apr 2006 15:18:25 -0400, Shelly wrote:
> Actually, all he need do is on the homepage <?php $page="something" ?>
> and on all pages do
> if (isset($page)) {
> ...
> } else {
> ...
> }
> }

But be wary of using it for anything more than changing a link like this,
if you're running with register_globals on (I know, it's not good
practice, but there may still be some old installations or those upgraded
and kept for compatibility).

At least Kevin's version would have checked for the exact value he set
(rather than yours that would be got round with www.foo.com?page=1)

Just pointing it out for less experienced PHPers.

Cheers,


Andy

--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

 

Navigation:

[Reply to this 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

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