I think so, though, I can't get that syntax to work for me. Here is my fuller script, based on your example. I've replaced your $uid with $p:
echo "<table width=\"100%\" border=\"0\" bordercolor=\"#BED0D6\" style=\"border-collapse: collapse\" cellspacing=\"0\" cellpadding=\"2\">";
$p = 'd_u'.$_GET['id'];
$query="SELECT d_id, d_u_id, ".$p.", u_id, u_lname, u_fname, u_mname, u_o_id, o_id, o_name FROM fs_directories, fs_users, fs_organization WHERE fs_directories.d_u_id = fs_users.u_id AND fs_users.u_o_id = fs_organization.o_id ORDER BY o_name, u_lname";
$result=mysql_query($query);
while ($row=mysql_fetch_array($result)) {
foreach($row as $thisvar => $thisval) { $$thisvar=$thisval; }
echo "<tr>
<td align=\"right\" class=\"resultsText\" width=\"200\">";
// ONLY DISPLAY ORGANIZATION NAME ONCE
if ($o_name!=$o_name_old) { echo "<b>" . $o_name . "</b>"; }
echo "</td>
<td width=\"25\" align=\"center\"><input type=\"checkbox\" name=\"permit[]\" value=\"" . $d_id . "_1\"";
if ($row["'".$p."'"] == 1) { echo " checked";}
echo "></td>
<td class=\"resultsText\">" . $u_lname . ", " . $u_fname . " " . $u_mname . "</td>
</tr>";
$o_name_old = $o_name;
}
echo "</table>";
I need the checkbox to be checked when the value of the field represented by -- 'd_u'.$_GET['id'] -- is equal to 1.