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

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

?>