After your "SELECT * FROM 'allflights'..." query, you're looping through the result set just overwriting the same variables in each pass. If you use a multidimensional array instead, you can loop through this array to build your html table.
Something like the following:
$query = mysql_query("SELECT * FROM `allflights` WHERE pilot_id='$pilot_id'");
$counter=0;
while ($row = mysql_fetch_array($query))
{
$flights[$counter]['flightno'] = $row["flightno"];
$flights[$counter]['hours'] = $row["hours"];
$flights[$counter]['departure'] = $row["departure"];
$flights[$counter]['destination'] = $row["destination"];
$flights[$counter]['aircraft'] = $row["aircraft"];
$flights[$counter]['date'] = $row["date"];
$counter++;
}
Then, when you build your table, loop through the array as follows:
<?
foreach($flights as $flight)
{ ?>
<table>
<tr>
<td bgcolor="#DCDDDE"bordercolor="#FFF4DD"><p align="left">
<font color="#333333" face="Arial" size="1"><?=$flight['flightno'];?></td>
<td bgcolor="#DCDDDE"bordercolor="#FFF4DD"><p align="center">
<font color="#333333" face="Arial" size="1"><?=$flight['date'];?></td>
<td bgcolor="#DCDDDE"bordercolor="#FFF4DD"><p align="center">
<font color="#333333" face="Arial" size="1"><?=$flight['hours'];?></a></td>
<td width="125"bgcolor="#DCDDDE"bordercolor="#FFF4DD"><p align="center">
<font color="#333333" face="Arial" size="1"><?=$flight['departure'];?></a></td>
<td width="130"bgcolor="#DCDDDE"bordercolor="#FFF4DD"><p align="center">
<font color="#333333" face="Arial" size="1"><?=$flight['destination'];?></a></td>
<td bgcolor="#DCDDDE"bordercolor="#FFF4DD"><p align="center">
<font color="#333333" face="Arial" size="1"><?=$flight['aircraft'];?></a></td>
</tr>
</table>
<? } ?>
Something like that...you'll most likely have to modify this. But this will at least give you all the records you are looking for.