<?php
require_once('conn.php');
header("Content-type: text/html; charset=utf-8");
//echo $password.'555555';
if (isset($_POST['adminupdate'])) {
session_start();
$a=$_SESSION['password'];
$Id=$_GET["Id"];
$username = trim($_POST['username']);
$password1 = trim($_POST['password1']);
$password2 = trim($_POST['password2']);
$nns = trim($_POST['nns']);

$b=md5($_POST['password']);
//echo $a.'分割',$b;


if ($a!=$b) {         //判断旧密码是否匹配
 echo "<script>alert('旧密码输入错误!');location.href='admin_list.php';</script>";
 exit;
 }
 
 if ($password1!=$password2) {         //判断新密码是否匹配
 echo "<script>alert('两次密码不一致!');location.href='admin_list.php';</script>";
 exit;
 }
 
$password2 = md5($password2);
 $sql = "update admin set username='$username',password='$password2',nns='$nns' where Id=".$Id;
  mysql_query($sql);
      //echo $sql;die();
 echo "<script>alert('修改成功!');location.href='admin_list.php';</script>";  
}
?>

 

稳定

产品可用性高于99.9%

贴心

全国7*24小时客服热线

专业

产品经理在线技术支持

快速

快速上线运营快

承诺

我们选择声誉

坚持

10年专注高端品质开发
  • 返回顶部