<?php
	
	include("connect.php");
	$staffID=$_GET['staffID'];
	$username=$_GET['username'];
	
	if($staffID!=$username){
	$query=mysql_query("DELETE from staff WHERE staffID='$staffID'");
	echo "<script>alert('Data delete successful')</script>";
	echo "<script language='javascript'>window.location='stafflist.php'</script>";
	}else{
	echo "<script>alert('Login user cannot delete their own data!')</script>";
	echo "<script language='javascript'>window.location='stafflist.php'</script>";
	}
?>