<?php
header("content-type:text/html;charset=utf-8");
session_start();
error_reporting(0);
if(!isset($_SESSION['admin_name'])){
   exit; 
}
date_default_timezone_set("PRC");
include "../sql.php";
$id=$_POST['xg_zonger_hid'];
$xg_zonger_username=$_POST['xg_zonger_username'];
$xg_zonger_jiage=$_POST['xg_zonger_jiage'];
    $sql="update tb_tot set username='{$xg_zonger_username}',jiage='{$xg_zonger_jiage}' where id='{$id}'";
   if(mysql_query($sql)){
       echo "<script>alert('修改成功！');location='../index.php';</script>";
   }else{
        echo "<script>alert('修改失败！')；history.back();</script>";
   }

?>