<!-- <?php 
include('../dbconnect.php');
/*
$empid=  array();
$hireddate = array();
$generalpos = array();
$detailsql = "SELECT * FROM empdetails";
$res = mysqli_query($conn, $detailsql);
while($row = mysqli_fetch_assoc($res)){
    $empid[] = $row['empid'];
    $hireddate[] = $row['hireddate'];
    $generalpos[] = $row['generalpos'];

}

for($a= 0; $a < count($empid); $a++)
{


    $sqlinsert = "INSERT INTO `positionhistory`( `position`, `date`, `empid`) VALUES ('$generalpos[$a]','$hireddate[$a]','$empid[$a]')";

    if(mysqli_query($conn, $sqlinsert)){
        echo 'INSERT SUCCESSS';
    }
}
 */
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 echo "NO DISPLAY";

$empid=  array();
$hireddate = array();
$generalpos = array();
$detailsql = "SELECT * FROM empdetails WHERE team='IT/Data Analytics'";
$res = mysqli_query($conn, $detailsql);
while($row = mysqli_fetch_assoc($res)){
    $empid[] = $row['empid'];
    $hireddate[] = $row['hireddate'];
    $generalpos[] = $row['generalpos'];

}

for($a= 0; $a < count($empid); $a++)
{


    echo $sqlinsert = "INSERT INTO `tbl_utilization` (`empid`, `date`, `activity`, `type`, `starttime`, `endtime`, `elapsedtime`, `remarks`, `reason`) 
    VALUES ('$empid[$a]','03/11/2019','Log In','Prod','10:40 AM','10:40 AM','0','','')";

    if(mysqli_query($conn, $sqlinsert)){
        echo 'INSERT SUCCESSS';
    }else{

        mysqli_error($conn);
    }
}
 
mysqli_close($conn);

?> -->