doSort.php 570 B

12345678910111213141516
  1. <?php
  2. $id = $_POST["id"];
  3. $yysa = $_POST['yys'];
  4. $yysabbr = $_POST['yysabbr'];
  5. $sortid = $_POST['sortid'];
  6. include_once("../../untils/conn.php");
  7. if ($con) {
  8. mysqli_query($con, "set names utf8");
  9. $data = $con->query("UPDATE sort SET yys ='" . $yysa . "',yysabbr='" . $yysabbr . "',sortid='" . $sortid . "' where id=" . $id);
  10. if ($data > 0) {
  11. echo "<script>alert('修改信息成功');window.location.href='../sort.php'</script> ";
  12. } else {
  13. echo ("<script>alert('修改失败');window.location.replace(document.referrer)</script>");
  14. }
  15. }
  16. $con->close();