Answers to various technical questions on php programming, mysql, linux, and many more categories.
Home / Programming / php / How can I modify a script that relies on register globals being turned on?
How can I modify a script that relies on register globals being turned on?
Last updated: 06/30/2009
This is not recommened for security purposes, but here's a short bit of code to add at the top of any scripts that otherwise require register_globals to be turned on:
if (!ini_get(register_globals)) { foreach ($_REQUEST as $r => $v) { if(!isset($$r)) { $$r = $v; } } }