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..
This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
And more good advice:
This might be useful too (migrating from php4 to php5):