require_once "conn.php";
session_start();
header("Content-type: text/html; charset=utf-8");
$act = $_POST['act'];
$id=$_GET["id"];
if($act == "xiugaiadminact"){
$id=$_POST['id'];
//获取post传入的username参数,并保存到$username中
$username = $_POST['username'];
//获取post传入的password参数,并保存到$password中
$password = $_POST['password'];
mysql_query("update t_admin set username = '$username',password = '$password' where id = $id");
echo "
alert('修改管理员成功')
";}
$res = mysql_query("select * from t_admin where id = $id");
$admin = mysql_fetch_array($res);
?>
修改管理员