<?php
require_once('../../include/class.inc.php'); 
$id=intval($_GET[id]);
$username=$_POST["username"]; 
$password=md5($_POST["password"]);  

//echo $id;
//echo exit;
if($username!="" && $password!="") {
    $sql="update admin set username='$username',password='$password' where id=$id";
	//echo $sql;
	$result=mysql_query($sql);
		if($result)
		{
			echo "<script>alert('修改成功！');location.href='user.php'</script>";
		}
		else
		{
			echo "<script>alert('修改失败！');location.href='user_up.php'</script>";	
		}

}

else{
 echo "<script language=javascript>alert('不能为空!');history.go(-1)</script>";
}
?>