A more secure way to register_globals on
Since PHP now automatically switches register_globals OFF, on some PHP scripts this causes a problem, especially if you have written quite a large script.
This snippet should solve the problems whilst remaining secure.
Copy and paste this script into the top of your main index.php file
<?php
// AGTC - Make register_globals on v1.0a
// AGTC Websolution - Visit http://website-scripts.co.uk for more free scripts
if (!ini_get('register_globals')) {
$reg_globals = array($_POST, $_GET, $_FILES, $_ENV, $_SERVER, $_COOKIE);
if (isset($_SESSION)) {
array_unshift($reg_globals, $_SESSION);
}
foreach ($reg_globals as $reg_global) {
extract($reg_global, EXTR_SKIP);
}
}
?>