<?php

require_once("headHotelStaff.php");

if($_POST["submit"])
{ 
   $sname=$_POST['sname'];  $hnm=$_POST['hiD'];

   $scost =$_POST['scost']; $ownID=$_POST['owniD'];
 
  $dateearned=$_POST['dateearned']; 
  
   if($con->vSname($sname) && $con->vDateearned($dateearned) && $con->vScost($scost))
      {
       require("successAddIncomeSourceFormStaff.php");

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

            require("repostAddIncomeSourceFormStaff.php");
           }
      }

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

?>