Take note of the = operator position. Just shft to leave at least one space. A common pitfal.
Also note that you tried to escape and notate at the beginning of your string definition
Code:
//Handle date issue
$map_eff_date=".$myear."-".$mmonth."-".$mday.";
should be
Code:
//Handle date issue
$map_eff_date = $myear."-".$mmonth."-".$mday;
$myear is in itself a variable. No escape to insert any delimiter required.