 
    <center>
    <label id="succ">
    <?php  
    
    echo $con->updateEmployeeIfo($jobtitle,$accountId,$salary, $hnm);
     ?>
    </label>
    </center>  
    <center>
     <?php
         $HD=$con->getMyOperationHotel($ownID,$hnm);
    
        if($HD->rowCount()>0)
        {
          $ro=$HD->fetch();
        }
      
   // }

         $W=$con->getHotelWorkers($hnm);


  //}
?>
 
 <table width="100%">
 <tr><td colspan="4"><label id="main_lab"><?php echo $ro["hname"];?> EMPLOYEE'S PROFILE</label></td>

 <td colspan="8" align="right"><ul></li>

                           <li>
                            <form action="addHotelWorkers.php" method="post">

                               <input class="hi" type="hidden" name="owniD"  value="<?php echo $ro["owner_id"];?>">


                              <input class="hi" type="hidden" name="hiD"  value="<?php echo $ro["hotel_id"];?>">

                              <input class="pos" type="submit" value="New employee" name="post">

                        </form>
                        </li></ul></td></tr>
  <tr class="tr1" >

  <td rowspan="2">

         <label id="min_lab">NAME</label>

  </td>

  <td rowspan="2">

         <label id="min_lab">EMAIL</label>

  </td>

  <td rowspan="2">

         <label id="min_lab">PHONE NUMBER</label>

  </td>

  <td rowspan="2">

        <label id="min_lab">GENDER</label>

  </td>

  <td rowspan="2">

        <label id="min_lab">OCCUPATION</label>

  </td> 

  <td colspan="5">

  <label id="min_lab"> PHYSICAL ADDRESS</label>

  </td>

  <td rowspan="2">

         <label id="min_lab">JOBTITLE</label>

  </td>


  <td rowspan="2">

         <label id="min_lab">SALARY</label>

  </td>

</tr>
 <tr class="tr1">

 <td>

<label id="min_lab">COUNTRY</label>

</td>

<td>
 
<label id="min_lab">REGION</label>

</td>

<td>

<label id="min_lab">DISTRICT</label>

</td>

<td>

<label id="min_lab">WARD</label>

</td>

<td>

<label id="min_lab">STREET</label>

</td>



</tr>

<?php
 
 if($W->rowCount()>0){
  $rN=$W->fetchAll();
  foreach ($rN as $key => $nR){
    
  $accountId=$nR["accountId"];

  $hW=$con->getHotelWorkersDetail($accountId);

  if ($hW->rowCount()>0) {
     
      $N=$hW->fetch();
?>   
<tr class="tr2">

<td>
  <?php
  echo $N["fname"]." ".$N["mname"]." ".$N["lname"];
 
  ?>
</td>

<td>
  
 <?php
echo  $N["email"];
 ?>
</td>

<td>
  <?php
echo $N["phoneno"];
 ?>

</td>

<td>
  
<?php
echo $N["gender"];
 ?>
</td>

<td>
  <?php
echo $N["occupation"];
 ?>

</td>

<td>
  <?php
echo $N["country"];
 ?>
</td>

<td>
  
<?php
echo $N["city"];
 ?>
</td>

<td>
  <?php
echo $N["district"];
 ?>
</td>

<td>
  <?php
echo $N["ward"];
 ?>
</td>

<td>
  <?php
echo $N["street"];
 ?>

</td>

<td>
  <?php
echo $nR["jobtitle"];
 ?>

</td>

<td>
  <?php
echo $nR["salary"];
 ?>

</td>
</tr>
<tr>
<td height="16px" colspan="12" align="right">
    <form action="editEmployeeDetailForm.php" method="post">

                               <input class="hi" type="hidden" name="owniD"  value="<?php echo $ownID;?>">

                              <input class="hi" type="hidden" name="emID"  value="<?php echo $nR["accountId"];?>">

                              <input class="hi" type="hidden" name="hiD"  value="<?php echo $hnm;?>">

                              <input class="pos" type="submit" value="Edit" name="post">

                        </form>

</td>

</tr>
<?php
}
else
{
?>
<tr class="tr2"><td colspan="10"> No employee currently register</td></tr>
<?php
}
}
}
?>

 </table></center>