You are here: Re: [PHP] need for $_POST[''] changed after server upgrade « PHP « IT news, forums, messages
Re: [PHP] need for $_POST[''] changed after server upgrade

Posted by Michael Hulse on 09/27/92 11:34

On Dec 12, 2005, at 8:21 PM, Ray wrote:
> Hello,
> Thanks Matt, I appreciate your help. your solution is a lot easier
> than mine.
> It's also nice to understand what was happening. I was introduced to
> PHP
> after that type of globals were considered 'evil' so I hadn't seen code
> written that way.
> Ray
> -----Original Message-----
>> Register globals is no longer ON I believe. That is why it happened.
>>
>> To fix this:
>>
>> Foreach($_POST as $key => $value) ${$key} = $value;
>>
>> That will convert all of your post variables to local variables.

Could not you also do:

<?php
if (count($_REQUEST) > 0) {
while(list ($key, $val) = each ($_REQUEST)) {
$$key = $val;
}
}
?>

 

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

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