I know that switching globals on and lowering the error reporting levelis the quick answer but you should really be looking to declare all your vars.
My main reason for saying this is that code is often ported to other servers where the settings different.
If you write an app for a box that has globals on and error reporting to E_ALL ~ NOTICE and then the script is ported then you're in trouble.
However if you write an app that sits on a box where the error reporting is E_ALL and globals are off then it don't matter if it gets ported as it will still work on boxes where these are switched on.
I'll admit that i like the easy life and one way of achieving that is to not have to re-write code, the tradeoff of the initial extra work certainly pays off when any of my code is ported to other boxes
😃