----- Original Message ----- From: "reagerconsulting" Hi Rob,
Thanks for that - seems to be the case. Does this mean that I need to turn register_globals on - or is there a way around it from within the script? Cheers, Rob. --- In [email protected], <[EMAIL PROTECTED]> wrote: > ----------------------------- > Hello reagerconsulting, > You did not mention the versions of PHP > and mysql. Run phpinfo() on both sites. My guess is that the working page is > on a older version of PHP that has "register globals" enabled and the non- > working is on a newer version that has "register globals" off. > > Also check your edits, you have commented out "design", "contact" and > "about" on the working version so perhaps there are other differences. > > Thanks, Rob. > ---------------------------- Hello Rob, This all depends on your server operating system and the PHP version. Advanced coders spend more time turning register globals "OFF" as it is a security risk. It is better to make the code work without register globals on. If you know the globals that need to be accessed then load them in manually like $variable = $_POST["variable"] $variable = $_GET["variable"] $variable = $_FILE["variable"] $variable = $_SERVER["variable"] $variable = $_COOKIE["variable"] $variable = $_SESSION["variable"] Your code will most probably be using GET or POST. Post the code to us for a better explanation. If there are many to transfer than do this - $keys = "name date type sex form year email etc etc etc"; $keys = explode(" ", $keys); foreach($keys) { ${keys} = $_GET[$keys]; // or $_POST } An easy and highly insecure way to do it is - foreach($_POST as $key => $value) { ${key} = $value; } foreach($_GET as $key => $value) { ${key} = $value; } Thanks Rob.
