Re: Help with proper post method...

From: Date: Thu, 07 Apr 2005 04:22:03 +0000
Subject: Re: Help with proper post method...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-212503@lists.php.net to get a copy of this message
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

« previous php.general (#212503) next »