<?php 
	// koneksi database
	include "../koneksi.php";

	// menangkap data yang di kirim dari form
		$NIK 		= $_POST['NIK'];
		$NAMA 		= $_POST['NAMA'];
		$POSISI 	= $_POST['POSISI_KERJA'];
		$PT 		= $_POST['PERUSAHAAN'];
		$LOKASI 	= $_POST['LOKASI_KERJA'];
		$DEPART 	= $_POST['DEPARTEMENT'];
		$EMAIL 		= $_POST['EMAIL'];
		$PASS 		= $_POST['PASS'];
		$STATUS		= $_POST['STATUS'];
		





		$a="UPDATE personal SET NAMA = '$NAMA', POSISI_KERJA = '$POSISI', PERUSAHAAN = '$PT', LOKASI_KERJA = '$LOKASI', DEPARTEMENT = '$DEPART', EMAIL = '$EMAIL', STATUS = '$STATUS' WHERE NIK = '$NIK'";
		mysqli_query($koneksi, $a) or die(mysqli_error($koneksi));

		$q="UPDATE masuk SET NAMA = '$NAMA', EMAIL = '$EMAIL' WHERE USERNAME = '$NIK'";
		mysqli_query($koneksi, $q) or die(mysqli_error($koneksi));
		
				echo '<div class="alert alert-success alert-dismissible fade in" role="alert">
				<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<strong> Sukses..!</strong> Data Berhasil Tersimpan.!
				<br>
				</div>';

		header("location:NAV.Emp.Info.php");
?>