The reason this code, and that in your previous post, works in php4 and not in php5 is because of a setting called [
PHP: Using Register Globals - Manual ] If you click that link and read that page it will tell you in plain english what you need to be looking out for to get your code to work in PHP4.
By default PHP4 used to have register_globals default to being on, so this "lazy code" would work. In PHP5, the default value is off, and in php6, you cannot use it at all.
A little tip, when posting code into the forum... use the following tags around it to preserve any indentation, makes it far easier to read. [code ] // PHP [/code ] (without the spaces before the last bracket)
__________________