<?php

	$login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
	
	mysql_selectDB("wauhaha_karaoke",$login);
	$StaffID =$_GET["StaffID"];

if($StaffID != ""){	
$result = mysql_query("SELECT StaffID FROM salary WHERE StaffID='$StaffID' ");
if(mysql_num_rows($result) == 1){
		echo "<script>alert('Your Staff Have Salary Already! ')</script>";
		echo "<script language='javascript'>window.location='salary.php'</script>";
}else
echo  "<script language='javascript'>window.location='adminarrangesalary.php?StaffID=$StaffID '</script>";	


}
	
?>