Would something like this start you off?
php code:
<?php
$id = "blah1" // Replace with Flight ID being viewed
$rank = "blah2"; // Replace with logged in user's rank
$rs = mysql_query("SELECT rank FROM itzeddie_flights WHERE id='{$id}'");
if(mysql_result($rs, 0, "rank.itzeddie_flights") == $rank)
{
echo("random text!");
}
?>
P.S. I tried to really think about what you mean.