doGroup.php 730 B

123456789101112131415161718
  1. <?php
  2. $group_id = $_POST["group_id"];
  3. $group_name = $_POST['group_name'];
  4. $group_portion = $_POST['group_portion'];
  5. $group_uptime = $_POST['group_uptime'];
  6. include_once("../../untils/conn.php");
  7. if ($con) {
  8. mysqli_query($con, "set names utf8");
  9. $data = $con->query("UPDATE proxy_group SET group_name ='" . $group_name . "', group_portion='" . $group_portion . "', group_uptime='" . $group_uptime . "' WHERE group_id=" . $group_id);
  10. if ($data > 0) {
  11. echo "<script>alert('修改信息成功');window.location.href='../group.php'</script>";
  12. } else {
  13. echo ("<script>alert('修改失败');window.location.replace(document.referrer)</script>");
  14. // echo "Error updating record: " . $con->error;
  15. }
  16. }
  17. $con->close();