As posted earlier by myself and others, the variable doesn't exist. You are saying
if($variable = '') $variable = 0;
But 'variable' doesn't exist.
A better way to do this is to say
if(empty($variable)) $variable = 0;
or
if(!isset($variable)) $variable = 0;
Depending on your php.ini PHP will report instances like this or will hide them, this particular problem is classified as a 'notice'. This means that your script will still work (Unless you make use of header() further in the script) but strictly speaking is not correct.
Either change your code, change your php.ini or change the level of error logging on each page.
There is nothing complex about this problem.
Andrew