1234567891011121314151617181920212223242526272829 |
- <?php
- header("Content-type:text/html;charset=UTF-8");
- include_once("../../untils/conn.php");
- if (empty($_GET['channel_id'])) {
- exit('<h1>连接数据库失败</h1>');
- }
- $channel_id = $_GET['channel_id'];
- $query = mysqli_query($con, "delete from channel where channel_id = {$channel_id}");
- if (!$query) {
- echo ("<script>alert('删除失败');history.back();</script>");
- } else {
- echo "<script>alert('删除渠道成功');window.location.replace(document.referrer)</script> ";
- }
- ?>
|