<?php
	include "koneksi.php";
	//$id=mysqli_real_escape_string($conn,$_POST["id"]);
	

	$id=$_POST["nama"];
	
	//$b = "SELECT * FROM data_karyawan WHERE id =".$id;
    //$res=mysqli_query($conn,$b);
	//$data=mysqli_fetch_assoc($res);
	//$nama = $data["nama_karyawan"];
    //$nik = $data["nik"];	

             $query = "DELETE FROM user WHERE nik_data_karyawan='$id'";
	         $result = mysqli_query($conn, $query);	
 echo $query;
             if($result)
	         {
		           echo "Data berhasil masuk";
	   	           header("location:hapusHakaksesSystem.php?p=1");
	         }
	         else
             {
	               header("location:hapusHakaksesSystem.php?p=2");
	               die("Error");
				   
				  
             } 			 
?>