you can use this variables without initialization but if you don't want to see these warnings you need to change a parameter in your php.ini.
Also you can use
if(isset($var1))
to see if the variable exists.
And you must change the error reporting paramenter to avoid the warnings
May be you have
error_reporting = E_ALL
try
error_reporting = E_ALL & ~E_NOTICE
I hope this helps!
Jose Garcia Sabbagh
Mexico City