<?php
	
	
	include "koneksi.php";
	$id=mysqli_real_escape_string($conn,$_GET["id"]);
    echo "ini".$id;	
    $tanggal_ditolak = date('d / m / yy');
	
	//disetujui = 2, ditolak = 1
    $q = "UPDATE data_purchasing_requisition SET status_hcga='1',tgl_ditolak_hcga='$tanggal_ditolak' WHERE id=".$id;
	$result = mysqli_query($conn, $q);

	if($result)
	{
		echo "berhasil";
		header("location:persetujuanPrHcga.php?p=2");
	}
	else
	{
		echo "gagal";
		header("location:persetujuanPrHcga.php?p=3");
	}
		

?>