your code has a number of issues with it.
1) the if statement is not complete, it's missing a closing parenthesis:
if ($row_Recordsetliveengineers['onsite'] == "YES" {
should be:
if ($row_Recordsetliveengineers['onsite'] == "YES") {
2) the echo for the if creates a new div, but this code is already inside a div.
the echo for the else does not create a new div. this will give you a bad layout.
rather than the if creating a new div, and using an else condition, you only need to use the if statement to add the style to the div that already exists:
<td<?php if ($row_Recordsetliveengineers['onsite'] == "YES") echo" bgcolor=\"#FF9966\"" ?>><?php echo strtoupper($row_Recordsetliveengineers['onsite']); ?></td>