<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Insert title here</title>
</head>
<body>
<script type="text/javascript"><?php
date_default_timezone_set('Etc/GMT-8');
//通过post获取页面提交数据信息
$userId = $_POST[userId];
$userName = $_POST[userName];
$userAge = $_POST[userAge];$conn = mysql_connect("127.0.0.1","test","test");//连接数据库
mysql_select_db("data2",$conn);$sql = "update user set UID='".$userName."',tory=".$userAge." where ID='".$userId."'";
mysql_query('set names utf8');
mysql_query($sql,$conn);//执行SQL$ = mysql_affected_rows();//返回影响行数
$url = "1234.php"; if($>0){echo "alert('成功')";}else{
echo "alert('失败')";
}mysql_close($conn);?>window.location= "1234.php";
</script>
</body>
</html>