I have a problem with delete account in PHP. In details, I develop the back-end admin control panel site, and in it have a function allow delete account in table Admin_Account. But when I delete, it also allows deleting admin account that current logging in admin control panel site. Can someone help me to prevent, don't let it delete an account that is logging in admin?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Delete account admin</title>
</head>
<body>
<?php
include("connect.php");
$sl="delete from admin where idAdmin=".$_GET['id'];
if(mysqli_query($con,$sl))
{
echo "<script language='javascript'>alert('Delete successful!');";
echo "location.href='index.php?xem=theloai';</script>";
}
?>
<?php include('close_ketnoi.php');?>
</body>
</html>