Hi, sounds like you may have had 'Register Globals' enabled in php 4, which is generally considered a bad practice since it can potentially allow ANYONE to create/inject their own global variables into your scripts, not just you.
You can find lots of documentation on how to emulate Register Globals. Just keep in mind this 'feature' has been removed from PHP altogether for good reasons..
Warning
This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
More info:
http://php.net/manual/en/security.globals.php
http://www.php.net/manual/en/faq.misc.php#faq.misc.registerglobals
http://en.wikibooks.org/wiki/PHP_Programming/Register_Globals
http://www.reddit.com/r/PHP/comments/13gdmb/so_i_found_out_register_globals_on_is_bad_now_my/
And more good advice:
http://community.apachefriends.org/f/viewtopic.php?f=16&t=43608&p=171052#p171058
This might be useful too (migrating from php4 to php5):
http://www.php.net/manual/en/migration5.php