<?php
	$login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
	
	mysql_selectDB("wauhaha_karaoke",$login);
	  $StaffID=$_GET["StaffID"];
	  
	  
$mon  = $_POST["mon"];
$tue  = $_POST["tue"];
$wed  = $_POST["wed"];
$thur = $_POST["thur"];
$fri  = $_POST["fri"];
$sat  = $_POST["sat"];
$sun  = $_POST["sun"];


$query2=mysql_query("UPDATE dutytime SET Monday = '$mon',
Tuesday='$tue',
Wednesday ='$wed',
Thursday ='$thur',
Friday ='$fri',
Saturday='$sat',
Sunday ='$sun'
WHERE StaffID='$StaffID' ");
if($query2){
	echo "<script language=javascript>alert('Update successful!!');window.location='http://www.wauhaha.com/karaoke/adminviewdt.php?StaffID=$StaffID '</script>";
}
echo "<script language=javascript>alert('Update fail!!');window.location='http://www.wauhaha.com/karaoke/adminviewdt.php?StaffID=$StaffID '</script>";
		  
	  
	  
?>
