<?php

if($_COOKIE['sejahtera_role'] == 10)
{
	include_once ("includes/setup_pemohon.inc.php");
}
else
{
	include_once ("includes/setup.inc.php");
}
//Header("Content-type: application/xml");
Header("Cache-Control: no-cache");

$num_errors = 0;

$myID = fetch_postget_val("myID", $_POST, $_GET);
$mykid = fetch_postget_val("mykid", $_POST, $_GET);
$dateTimeNow = dateTimeNow();

//get program from pemohon
$indicator_Query = "SELECT id_anakemas
					FROM m_anakemas
					WHERE kpbaru_anakemas = ?";
$PDO_stmt = $PDO->prepare($indicator_Query);
$PDO_stmt->bindValue(1, $mykid, PDO::PARAM_STR);
$PDO_stmt->execute();
$pemohon_List = $PDO_stmt->fetch(PDO::FETCH_ASSOC);

if($pemohon_List['id_anakemas'] > 0 && $pemohon_List['id_anakemas'] != $myID)
	echo "No MyKid telah wujud dalam sistem";
else
	echo 1;
?>