";
$query="SELECT pnumber,pname,hours FROM project,works_on where pno=pnumber and essn=$essn";
$result=mysql_query($query);
$num=mysql_numrows($result);
if ($num > 0) {
?>
Project Number
Project Name
Hours
$i=0;
while ($i < $num) {
$pno=mysql_result($result,$i,"pnumber");
$pname=mysql_result($result,$i,"pname");
$hours=mysql_result($result,$i,"hours");
?>
$i++;
}
} else
echo "Employee works for no project ";
echo "
";
echo "
Dependents:
";
$query="SELECT dependent_name,sex,bdate,relationship FROM dependent where essn=$essn";
$result=mysql_query($query);
$num=mysql_numrows($result);
if ($num > 0) {
?>