How can I modify a script that relies on register globals being turned on?

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; } } }