12345678910111213141516171819 |
- <?php
- $id = $_POST["id"];
- $user = $_POST['user'];
- $pwd = $_POST['password'];
- $token = $_POST['token'];
- $salt = 'make';
- $hashedToken = md5($token . $salt);
- include_once("../../untils/conn.php");
- if ($con) {
- mysqli_query($con, "set names utf8");
- $data = $con->query("UPDATE admin SET user ='" . $user . "',password='" . $pwd . "', token='" . $hashedToken . "'where id=" . $id);
- if ($data > 0) {
- echo "<script>alert('修改信息成功');window.location.replace(document.referrer)</script> ";
- } else {
- echo ("<script>alert('修改失败');window.location.replace(document.referrer)</script>");
- }
- }
- $con->close();
- ?>
|