You've fixed things but you haven't fixed things. Like these:
if(isset($_POST['d_name'])){
}
if(isset($_POST['manner_death'])){
}
if(isset($_POST['place_death'])){
}
if(isset($_POST['nok'])){
}
if(isset($_POST['rel_nok'])){
}
if(isset($_POST['morgue_att'])){
}
What are those doing? Nothing. They don't do anything. Then you have
if(isset($_POST['tag_num'])){
if(isset($_POST['treatment']))
The first line makes sense, but the second? Without a pair of { } then it will only run the very first line of code that comes after: the assignment for $d_name.
Then in your query,
$query = "insert into data
( d_name, manner_death, place_death ,nok, rel_nok, morgue_att, tag_num, treatment) values
( '$d_name'.'$manner_death','$place_death','$nok','$rel_nok','$morgue_att','$tag_num','$treatment')";
you managed to fix the one syntax error but you created a new one.
You cannot create websites by putting code in your editor and hoping everything will work. You have to make actual, conscious, deliberate decisions about the code. You have to know what different pieces of code mean. You have to understand why code is what it is and then how you can use it to accomplish what you want.
So before you try to write more code, stop and take a few days to learn what you can about PHP. Then come back to this file and put some thought into each line of code in it.