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

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

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

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

?>