I'm assuming you haven't defined all of your variables for the rows, and that's probably why it won't work:
Make sure you define them:
id might be
PHP Code:
$id = mysql_result($result,$i,"id");
and do that with the other undefined variables.
For that to work you must use an iterator in your while loop:
PHP Code:
$i = 0;
while($row = mysql_fetch_array($result)) {
extract($row);
echo '
<tr>
<td>'.$id.'</td>
<td><a href="index.php?page=view&id='.$id.'">'.$subject.'</a></td>
<td style="background-color: '.$color.'">'.$urgency.'</td>
<td>'.$date.'</td>
<td><input type="checkbox" name="checkbox[]" value="'.$id.'" /></td>
<td>'.$status.'</td>
</tr>';
// Get status color
if($urgency == "low") {
$color == "#F19F00";
}
if($urgency == "medium") {
$color == "#EC7501";
}
if($urgency == "high") {
$color == "#EC3801";
}
if($urgency == "urgent") {
$color == "#FF0000";
}
i++;
}
Bookmarks