The if statement isn't placed within the while loop.
The while loop is running straight to the end of your recordset, then you're asking the if statement.
Place it inside the while loop, and you should see the correct results.
$get_task_pc=mysql_query("select * from $db_tasks where page='wakeup' order by id");
while ($row2=mysql_fetch_array($get_task_pc)) {
$del_task = "$row2[tname]";
$task_id = "$row2[tid]";
if($del_task==$row[pc_mac]) {
$task_manager="<a href=\"/adm_content_pc_edit.mrm?mt=$mt&do=RemoveTask&id=$task_id\" onclick=\"return confirmSubmit()\"><img width=\"16\" height=\"16\" alt=\"Remove Task\" border=\"0\" src=\"/images/button_remove.png\"></a>";
} else {
$task_manager="<a href=\"/adm_content_pc_edit.mrm?mt=$mt&do=Task&id=$row[pc_mac]\"><img width=\"16\" height=\"16\" alt=\"Scheduled Task\" border=\"0\" src=\"/images/button_task.png\"></a>";
}
}