


<?php
	$login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
	
	mysql_selectDB("wauhaha_karaoke",$login);

	$StaffID=$_GET['StaffID'];
	$Salary=$_POST["salary"];




  
  
  $result = $_POST["salary"] * 0.89;
 

 $epf=$_POST["salary"] * 0.11;
 
$query2=mysql_query("UPDATE salary SET Salary='$Salary',
Epf = '$epf',
TSalary = '$result'
WHERE StaffID='$StaffID'");
if($query2){
	echo "<script language=javascript>alert('Update successful!!');window.location='http://www.wauhaha.com/karaoke/salary.php'</script>";
}
echo "<script language=javascript>alert('Update fail!!');window.location='http://www.wauhaha.com/karaoke/salary.php'</script>";
	
	?>

	
