<?php

/* $Id: SelectCustomer.php 7133 2015-02-07 03:23:51Z daintree $*/

//include('includes/session.inc');
//$Title = _('HRMS');
//include('includes/header.inc');
//include('includes/SQL_CommonFunctions.inc');
//echo '<link href="' . $RootPath . '/css/evergreen2'.'/default.css" rel="stylesheet" type="text/css" media="screen"/>';

      
$servername1 = "localhost";
$username1 = "sooggoo";
$password1= "4Compassion*";
$dbname1 = "tebaracuts";

// Create connection
$remote = mysqli_connect($servername1, $username1, $password1, $dbname1);
// Check connection
if (!$remote) {
    die("Connection failed: " . mysqli_connect_error());
}


//get loccode to know which location this pos is for stock
if(isset($_POST["username"])&& isset($_POST["rosterid"]) )
	

{
	 $username =  $_POST["username"];
 $rosterid =  $_POST["rosterid"];
 $sql= "SELECT rosterid FROM rosteringtimesheet WHERE employeeid ='".$username."'AND rosterid = '".$rosterid."'";
	$result = $remote->query($sql);
	$data =array();

foreach  ($result as $row){
	
	$data[] = $row;
}

mysqli_close($remote);

echo json_encode($data);
	
	
}



?>

