我只为员工做一个程序,要求拼贴的文具,我想检查一下员工表中是否存在员工的ID,我该如何检查员工中是否存在员工ID?桌子?
if(isset($_POST['ID'])){
$query=mysqli_query($link,"IF exists (SELECT * FROM Employees WHERE EMP_ID='$id')" );
}
if(!$query){
echo '<script type="text/javascript">';
echo 'alert("You are not allowed to request")';
echo ' </script>';
}elseif($query){
echo '<script type="text/javascript">';
echo 'alert("Your request is successfully submitted")';
echo ' </script>';
}