Well that error normally refers to not enough ending brackets
}
or even too many before the end of the script. I just checked your script and there is a bug on the second last line. It looks like you are trying to echo a bracket and when counting the brackets there aren't enough closing brackets before the script ends. So try making the last two lines the following:} } ?>
got the solution already. thanks sir.