<?php 
header("Access-Control-Allow-Headers: Authorization, Content-Type");
header("Access-Control-Allow-Origin: *");
include("confiq.php");

$input = file_get_contents("php://input");
$post = json_decode($input, true);
if((isset($_SERVER['PHP_AUTH_USER'])) && (isset($_SERVER['PHP_AUTH_PW'])))
{
if(($_SERVER['PHP_AUTH_USER']=="Xh83!sA") && ($_SERVER['PHP_AUTH_PW']=="HshFla72nsFa,s==ds0adsd028-=29ndgala")){

$idmember=$post["idmember"];
$npsn=$post["npsn"];

include("confiq.php");
$koneksi=koneksi_tabungan($npsn);

		  $query2 ="SELECT * FROM `tb_rekening_kantin` WHERE (idanggota='".$idmember."')";  
		$hasil = mysqli_query($koneksi,$query2);
		while($row = mysqli_fetch_assoc($hasil)) {
		$data[] = $row;
		}
		$json = json_encode($data);
		echo $json;
}  
}  

?>