upChannel.php 851 B

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