You are here: Re: Parameters in PHP « PHP Programming Language « IT news, forums, messages
Re: Parameters in PHP

Posted by Good Man on 10/23/07 16:04

"Jeff Gaines" <jgaines_newsid@yahoo.co.uk> wrote in
news:xn0fcsm06378v50002@news.individual.net:


> They don't work as they are but I can get the parameters by using
> $_GET['id'] or sometimes $_POST['id'].
>
> Is this a result of different versions of php (I am using v5) where
> behaviour has changed or is it something else that is going completely
> over my head because I am so new to this?


It's a change in the way PHP is set up; In PHP 3 (and possibly early
versions of 4?), "register_globals" was set to "on", which meant that you
didn't have to specify any variables before hand - they were created when
you asked for them.

Most PHP installations now have "register_globals" set to Off, and scripts
like the one you posted will be in trouble unless they're modified like
you've done above. That kind of script is understandable if written before
2002, but really is incredibly bad practice created done afterwards.


http://ca.php.net/register_globals

 

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

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