If you add some identation to your code, and perhaps tidy up the last conditional to use an 'elseif' rather than your (incorrectly) nested block you get:
if (isset($_SESSION['checkbox10']))
{
fwrite($handle,'<td><xsl:value-of select="fgeu_code"/></td>'."\n");
}
elseif ($_SESSION['dropdown'] == "fgeu_code")
{
fwrite($handle, '<td bgcolor=\"$colour\"><xsl:value-of select="fgeu_code"/></td>' . "\n");
}
This meas that if a session variable called checkbox10 exists at all then "<td><xsl:value-of select="fgeu_code"/></td>" will be written to the file. If it doesn't exist and if the session variable dropdown has the value "fgeu_code", then the string '<td bgcolor=\"$colour\"><xsl:value-of select="fgeu_code"/> </td>' will be written to the file.
Therefore, it must be the case the session variable checkbox10 exists.