You are here: Re: [PHP] Help with proper post method... « PHP « IT news, forums, messages
Re: [PHP] Help with proper post method...

Posted by Richard Lynch on 04/07/05 07:22

On Tue, April 5, 2005 10:23 pm, Joey said:
> OK I am migrating some sites from an old school server to one with MySQL 4
> &
> newest PHP, however certain things aren't running because of the
> register_globals variable on the new server is set to OFF for security
> reasons.
>
> What I am trying to do is post like so with hidden variables
>
> <form method="post" action="display_info.php">
>
> The display_info.php says Undefined variables in the file, because of
> course
> since globals is off it's not being passed to it from the first form.
>
> Now I'm not trying to become the master here, but need a quick and dirty
> way
> of patching these programs to accept the hidden passed values so I don't
> have to go and re-code everything...
>
> Any links to a good example etc would be greatly appreciated.

For each variable that it says is "Undefined" and/or which is coming from
POST, simply global search and replace:

$foo -> $_POST['foo']

If it's embedded in a "string$foo" you want "string$_POST[foo]"

Note that doing import($_POST) is strictly an emergency measure which
completely defeats the purpose of register_globals OFF in the first place.

You can do it for a few hours, days before you fix it for real, as above.

--
Like Music?
http://l-i-e.com/artists.htm

 

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

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