目录结构

PHP ajax+jQuery 实现批量删除功能实例代码小结

piliangshan.php

<"select * from user";
  $result = mysqli_query($conn, $sql);
"zh-CN">
<head>
  <meta charset="UTF-8">
  <title>全选演示</title>
  <meta http-equiv="X-UA-Compatible" content="IE=Edge">
  <link rel="stylesheet" type="text/css" href="./static/bootstrap.min.css" rel="external nofollow" >
  <script src="/UploadFiles/2021-04-02/jquery.js">

piliangdo.php

<"content-type:text/html;charset='utf-8'");
  require_once './db_conn.php';
  
  $ids = trim($_POST['ids']);
  $ids = explode(',', $ids);
  foreach ($ids as $key => $val) {
     $del_sql = "DELETE FROM `user` WHERE id = '$val'";
     $result = mysqli_query($conn, $del_sql);
  }
  if ($result) {
    echo "yes";
  }
  else{
     echo "no";
  }
"color: #ff0000">总结

以上所述是小编给大家介绍的PHP ajax+jQuery 实现批量删除功能实例代码小结,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!

华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com