<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
include("connect.php");
$id = $_POST["edituser"] ;
$strSQL = "UPDATE tb_user SET ";
$strSQL .="Username = '".$_POST["username"]."' ";
$strSQL .=",Password = '".$_POST["password"]."' ";
$strSQL .=",Name = '".$_POST["nameuser"]."' ";
$strSQL .=",Email = '".$_POST["email"]."' ";
$strSQL .=",Tel = '".$_POST["tel"]."' ";
$strSQL .=",Position = '".$_POST["Position"]."' ";
$strSQL .=",Department = '".$_POST["Department"]."' ";
$strSQL .=",Usertype_id = '".$_POST["usertype"]."' ";
$strSQL .="WHERE User_id = '".$id."' ";
$objQuery = mysql_query($strSQL);
if($objQuery)
{
									echo"<script language='JavaScript'>";
									echo"alert('บันทึกข้อมูลเรียบร้อย');";
									echo"</script>";		
				echo "<meta http-equiv='refresh' content='0;url=userall.php?'>";
}
else
{
	echo "Error Save [".$strSQL."]";
}
mysql_close($objConnect);
?>
<script src="bootstrap/js/jquery.js"></script>
<script src="bootstrap/js/bootstrap-datepicker.js"></script>
<script src="bootstrap/js/bootstrap.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
<script>window.jQuery || document.write("<script src='js/jquery-1.5.1.min.js'>\x3C/script>")</script>
<script src="js/app.js"></script>
</body>
</html>