find: if ($vpoint5 == '') { $vpoint5 = 0; } after it add: if ($characters == '') { $characters="0"; } if($pdeduction == '') { $pdeduction="0"; }