<?php
session_start();
include"../../../../inc/conn.php";

// CEK HAK AKSES DISINI

$id  		= str_replace("'","`",(isset($_SESSION['id_admin'])) ? $_SESSION['id_admin'] : "");

$nama_lengkap  	= str_replace("'","`",(isset($_POST['nama_lengkap'])) ? $_POST['nama_lengkap'] : "");


$update = mysqli_query($connect,"update tb_admin set 

		nama_lengkap 	= '".$nama_lengkap."'

where id_admin='".$id."'")or die(mysqli_error($connect));


if($update){
	echo"<script>alert('Profil diperbarui !');history.go(-1)</script>";
	echo"<script>document.location.href='../../profil'</script>";
}else{
	echo"<script>alert('Gagal mengeksekusi perintah ini !');history.go(-1)</script>";
}


?>