It's a pretty obvious mistake. Variables under single quotes will not be parsed which is what you have done. With your current code, $log_type
will have the value .$data["log_type"].
(tested)
So, your code of:
$log_type= '.$data["log_type"].';
should be:
$log_type= $data["log_type"];
If you want single quotes around the value, you should do:
$log_type = "'".$data["log_type"]."'";