<?php
 
 
//require_once("header.php");
 
if($_POST["submit"])

{ 
   $empDate=$_POST['dhired'];

   $depart=$_POST['depart'];

	 $fname= $_POST['fname'];

   $mname=$_POST['mname'];

	 $lname=$_POST['lname']; 

	 $email=$_POST['email'];

   $password=$_POST['password'];

	 $phoneno=$_POST['phoneno'];  

	 $address=$_POST['address'];  

	 $country=$_POST['country'];

	 $gender=$_POST['gender'];

	 $dob=$_POST['dob'];

	 $occupation=$_POST['occupation'];
 

     $rg=Date("Ymdhis").substr(10,2);
     $reg=md5(substr($rg,1,11));
     $regdate=Date("Y-m-d");

//CHECKING ENDS HERE

  require_once "labClass.php";
  
  $con = new labClass();

  if(!$con->vFname($fname) || !$con->vMname($mname) || !$con->vLname($lname) || !$con->vAddress($address)  || !$con->vCountry($country) || !$con->vPhoneno($phoneno)  ||  !$con->vGender($gender) || !$con->vDate($dob) || !$con->vOccupation($occupation))
          
          {
            

            require_once "pRegformErrRl.php";

 
          }

      else{
             $con->addUsers($password,$depart,$email,$fname,$mname,$lname,$gender,$occupation,$phoneno,$country,$address,$dob,$empDate);
          //echo $con->empRegister($empDate,$email,$depart,$password,$phoneno,$fname,$mname,$lname,$gender,$occupation,$country,$address,$dob);

                //$rQ);
               // require_once("dBconn.php");
               // $dBcon= new  dBconn();
               // $pwd=$password;
                //$date=$reg;
                //$rQ=$dBcon->addClient($fname,$lname,$phoneno,$email,$pwd,$date);
               
                ?>
                <h5 class="text-success">Successfull registered!..</h5>
                <?php
                require_once "empRegForm.php";
                 
          }
   
 
}



?>