doUpdatesta.php 915 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. $id = $_POST["id"];
  3. $status = $_POST['status'];
  4. $card_sta = $_POST['card_sta'];
  5. $beizhu = $_POST['beizhu'];
  6. $oderid = $_POST['oderid'];
  7. include_once("../../untils/conn.php");
  8. if ($con) {
  9. mysqli_query($con, "set names utf8");
  10. $data = $con->query("UPDATE oder SET status ='" . $status . "',card_sta ='" . $card_sta . "', beizhu='" . $beizhu . "'where id=" . $id);
  11. if ($data > 0) {
  12. echo "<script>alert('修改信息成功');window.location.href='../oderlist.php'</script> ";
  13. } else {
  14. // echo "Error updating record: " . $con->error;
  15. echo "<script>alert('修改信息失败');window.location.href='../oderlist.php'</script> ";
  16. }
  17. }
  18. $sql = "UPDATE revenue SET oder_sta = '$status' WHERE oderid = '$oderid'";
  19. if ($con->query($sql) === TRUE) {
  20. // echo "Record updated successfully";
  21. } else {
  22. // echo "Error updating record: " . $con->error;
  23. }
  24. $con->close();
  25. ?>