I think they are called Notices. If you have only few problems then you have to define the variables before you use or if you have check if the variable is already defined or not with isset() function.
If you have lots of such notices, then you may want to switch off the Notices either by changing the error reporting from ini or with the function error_reporting(). See the examples and descriptions in php.ini file of your local:
; Default Value: E_ALL & ~E_NOTICE
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATED