<?php

require_once("headHotelStaff.php");

if($_POST["submit"])
{ 
     $hnm=$_POST['hiD']; $jobtitle =$_POST['jobtitle']; 
     $ownID=$_POST['owniD']; $salary =$_POST['salary'];
    $accountId =$_POST['accountId'];
     
   
   if($con->vJobtitle($jobtitle) && $con->vSalary($salary))
      {
       require("successAddHotelWorkersStaff.php");

      }
   else
      {
	     if(isset($_POST['hiD']) && isset($_POST['owniD']))
           {

            require("repostAddHotelWorkersStaff.php");
           }
      }

 
     }
else 
     {
	echo "Error occured when saving data!..";
     }

?>