this part of php that connected with db
$q2="select *from emp order by id";
$r2=mysql_query($q2)or dai("query faild:"mysql_error());
while($x=mysql_fetch_array($r2)
{
if($x["depno"]==10)//dose it right to use $x=["depno"]like this when i use the query select* from the table??
{
echo"<tr><td>$x["emloyeeno"]</td>";
echo"<td>$x["employee name"]</td>";
echo"<tr><td>$x["address"]</td>";
echo"<td>$x["salary"]</td>";
$sum=$sum+$x["salary"];
}
}