The string concat in php is a . not a +, so i think you are trying to do
a string concat here.
$vendor_code = "VH" + $w1 + $w2 + $w3 + $date;
it should be
$vendor_code = "VH" . $w1 . $w2 . $w3 . $date;
also you are not adding this string into the database you are using the
hidden post var which i don't see being changed at all so I am not sure
what data is in it, try changing