设为首页 加入收藏

TOP

PHP+MySql+Bootstrap实现用户界面数据的删除、修改与批量选择删除——实例操作(一)
2017-10-10 08:31:56 】 浏览:4750
Tags:PHP MySql Bootstrap 实现 用户界面 数据 删除 修改 批量 选择 实例 操作

第一步:在数据库中建立要操作的信息表 如下图:

第二步:实现对该信息表中数据的删除功能

代码如下:main(主页面)

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>删除功能</title>
        <script src="bootstrap/js/jquery-1.11.2.min.js"></script>  //引入这里的三个文件
        <script src="bootstrap/js/bootstrap.min.js"></script>
        <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
        <div style="height: 100px;"></div>                    
        <form action="batch_process.php" method="post">  //利用form表单进行提交页面
        <table class="table table-hover" style="max-width: 800px;margin-left: 260px;">
              <thead>
                <tr>
                  <th><input type="checkbox" onclick="qx(this)"/>&nbsp;&nbsp;&nbsp;代号</th>
                  <th>名称</th>
                  <th>价格</th>
                  <th>产地</th>
                  <th>库存</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody>
<?php
              $db = new MYSQLi("localhost","root","","0710_info");
              $sql = "select * from fruit";
              $result = $db->query($sql);
              $arr = $result->fetch_all();
              
              foreach($arr as $v){
                  echo "<tr>
              &n

首页 上一页 1 2 3 4 5 6 下一页 尾页 1/6/6
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇安装Composer PHP Warning: copy(.. 下一篇利用PHP连接数据库操作用户注册、..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目