RE: [PHP] need for $_POST[''] changed after server upgrade
| From: | Ford, Mike | Date: | Tue, 13 Dec 2005 10:25:46 +0000 |
| Subject: | RE: [PHP] need for $_POST[''] changed after server upgrade | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-227370@lists.php.net to get a copy of this message | ||
On 13 December 2005 04:22, Ray wrote:
> Hello,
> Thanks Matt, I appreciate your help. your solution is a lot
> easier than mine.
even easier:
extract($_POST);
>
> -----Original Message-----
> From: "Matt Babineau" <matt@criticalcode.com>
> To: "'Ray'" <ray@media32.ca>, <php-general@lists.php.net>
> Date: Sun, 11 Dec 2005 22:42:46 -0800
> Subject: RE: [PHP] need for $_POST[''] changed after server upgrade
>
> > 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.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm