<?php
 
include 'dbconfig.php';
 
// Create connection

//$date1=$_GET['date1'];
//$date2=$_GET['date2'];
//$kodecab=$_GET['kodecab'];
//$item_code=$_GET['item_code'];

//echo $notrans;
 
$conn = mysqli_connect($servername, $username, $password, $dbname);
 
// Check connection
 
if (!$conn) {
 
    die("Connection failed: " . mysqli_connect_error());
 
}
 
$sql3="select hak from tbhak ";
$res3 = mysqli_query($conn, $sql3);


 $items = array();
 
 if (mysqli_num_rows($res3) > 0) {
 
    while($row = mysqli_fetch_object($res3)){
 
        array_push($items, $row);
 
//$result["errorcode"] = "1";
 
    $result["data"] = $items;
 
}}
else
{
 
       $result["data"] = "failed";
 
}
 
echo json_encode($result);
 
mysqli_close($conn);

 
?>