<?
require("config.inc");
$staffID = $_GET['staffID'];
$StaffName = $_POST['Sname'];
//echo "<script>alert('".$productType."');</script>";
$result = mysql_query("update tbl_user SET username='$StaffName' where user_ID='$staffID'");
//$row = mysql_fetch_array($result);
if($result-->0){
echo "<script>alert('Update Success');</script>";
echo "<script>window.location='editStaff.php?staffID=".$staffID."';</script>";
}
else{echo "<script>alert('Failed to update');</script>";}
?>