I have done several loops that are working on different pages for a NukePHP module I am working on, but I can't figure out why this one wont work. It seems simple enough but I'm scratching my head. I have tried it a couple different ways but still no go.
. " <td align=\"center\" bgcolor=\"#666666\">"
. " <b><font color=\"#000000\">Unit Personnel</font></b>"
. " </td>"
. " </tr> <tr>"
. " <td align=\"left\" bgcolor=\"#777777\" valign=\"top\" width=\"741\">"
. " <table border=\"1\" cellpadding=\"2\" cellspacing=\"1\" width=\"100%\" bordercolor=\"#111111\">"
. " <tr>"
. " <td width=\"13%\">"
. " <b><font color=\"#000000\">Rank</font></b>"
. " </td>"
. " <td width=\"87%\">"
. " <b><font color=\"#000000\">Name</font></b>"
. " </td>"
. " </tr>";
//returns all units personnel assigned to the chosen platoon
$unit_id = $_GET['unit_id'];
$sql = "SELECT rm.u_handle, rm.unit_id, rr.rankname, FROM roster_members rm, roster_ranks rr WHERE rm.unit_id = '$unit_id'";
$result = $db->sql_query($sql);
while ( $row = $db->sql_fetchrow($result) ) {
$rankname = $row["rankname"];
$u_name = $row["u_handle"];
echo " <tr>";
echo " <td width=\"13%\">";
echo " <b><font color=\"#000000\">$rankname</font></b>";
echo " </td>";
echo " <td width=\"87%\">";
echo " <b><font color=\"#000000\">$u_name</font></b>";
echo " </td>";
echo " </tr>";
}
echo "</table>";
echo "</table>";
echo "</body>";
echo "</html>";
CloseTable();
include("footer.php");
?>
It is supposed to fill the rows of assigned personell to their units in the following table.
http://www.3rd-infantry-division.net/modules.php?name=MILPACS&file=unitprofile&unit_id=2