this helps if you want to make these old scripts working with register globals
off ...
since PHP version 4.2 you can't get POST or GET variables
like you could in the old versions. So to use your old scripts you either
would have to rewrite the whole thing (which would be the more secure solution),
but sometimes this is a lengthy procedure. This is where this snippet
jumps in. Place this on top of all the files and it will get your
variables.
01<?php 02 03// extracts given variables 04if(phpversion()<=4.2) 05{ 06if(isset($_POST))extract($_POST); 07if(isset($_GET))extract($_GET); 08if(isset($_SERVER))extract($_SERVER); 09if(isset($_ENV))extract($_ENV); 10if(isset($_COOKIE))extract($_COOKIE); 11} 12 13// use phpversion() to find out 14// which version of PHP your server is running 15echophpversion(); 16 17?>