Is this code part of a bigger code? Perhaps you could attach a copy of the whole page?
There are a number of things wrong. To address your parse error: I am going to assume that line 98 is </body>. You can't just put HTML inside <?php tags. If you want to output HTML from within PHP, you need to use print or echo statements.
In the first line, you have no quotes around your SELECT statement. That might not cause an error ($sql most likely = 0), but it's wrong.
There seem to be some other errors, but I can't correctly diagnose them since you didn't include all relevant code. Since this looks like part of a bigger page, any other advice I give you will most likely be misguided.