dslreports logo
Elfstone
join:2001-11-14
Bayonne, NJ

Elfstone to GILXA1226

Member

to GILXA1226

Re: strange problem with PHP

On newer versions of PHP(I believe 4 and up) the option "register_globals" is turned off in the php.ini file for security reasons. This option, when on, allowed you to view variables passed from forms the way you did in your original code, but because these can easily be faked by just typing them, they turned the option off by default. Now you must refer to them by the specific $_GET or $_POST variables, depending on which you use in your form. Sort of an issue of forcing people to write safer code.

GILXA1226
MVM
join:2000-12-29
Dayton, OH

GILXA1226

MVM

said by Elfstone:
On newer versions of PHP(I believe 4 and up) the option "register_globals" is turned off in the php.ini file for security reasons. This option, when on, allowed you to view variables passed from forms the way you did in your original code, but because these can easily be faked by just typing them, they turned the option off by default. Now you must refer to them by the specific $_GET or $_POST variables, depending on which you use in your form. Sort of an issue of forcing people to write safer code.

You know I remember that now, it's just been so long since I've used PHP that I had forgotten it. Thanks for the refresher.