PHP 基础
PHP 简介
PHP 入门
PHP 语法
PHP 变量
PHP 常量
PHP 输出和打印
PHP 数据类型
PHP 字符串
PHP 运算符
PHP If…Else
PHP Switch…Case
PHP 数组
PHP 数组排序
PHP 循环
PHP 函数
PHP 数学运算
PHP GET 和 POST
PHP 高级
PHP 日期和时间
PHP 包含文件
PHP 文件系统
PHP 解析目录
PHP 文件上传
PHP 文件下载
PHP Cookies
PHP Sessions
PHP 发送邮件
PHP 表单处理
PHP 表单验证
PHP 过滤器
PHP 错误处理
PHP 类和对象
PHP 魔术常量
PHP JSON 解析
PHP 正则表达式
PHP 异常处理
PHP 和 MySQL 数据库
PHP MySQL 简介
PHP MySQL 连接
PHP MySQL Create Database
PHP MySQL Create Table
PHP MySQL Insert
PHP MySQL Prepared
PHP MySQL Last Inserted ID
PHP MySQL Select
PHP MySQL Where
PHP MySQL Limit
PHP MySQL Order By
PHP MySQL Update
PHP MySQL Delete
PHP MySQL CRUD 应用
PHP MySQL Ajax 搜索
PHP MySQL 登录系统
PHP参考
PHP String Functions
PHP Array Functions
PHP File System Functions
PHP Date/Time Functions
PHP Calendar Functions
PHP MySQLi Functions
PHP Filters
PHP Error Levels
PHP常见问题解答
如何在 PHP 中编写注释
如何在 PHP 中删除字符串中的空格
如何在 PHP 中查找字符串中的字符数
如何在 PHP 中查找字符串中的单词数
如何在 PHP 中删除字符串中的特殊字符
如何在 PHP 中替换字符串中的一个单词
如何在 PHP 中对字符串前面追加
如何在 PHP 中对字符串后面追加
如何在 PHP 中从字符串中提取子串
如何在 PHP 中比较两个字符串
如何在 PHP 中获取当前页面的 URL
如何在 PHP 中通过连接数组值创建字符串
如何在 PHP 中将字符串拆分为数组
如何在 PHP 中合并两个字符串
如何在 PHP 中把字符串转换成小写字母
如何在 PHP 中把字符串转换成大写字母
如何在 PHP 中把字符串的第一个字母转换成大写字母
如何在 PHP 中把特殊的 HTML 实体转换回字符
如何在 PHP 中删除字符串开头的空格
如何在 PHP 中删除字符串结尾的空格
如何在 PHP 中新建一行
如何在 PHP 中查找字符串长度
如何在 PHP 中检查变量是否已设置
如何在 PHP 中检查变量是否为空
如何在 PHP 中检查变量是否为NULL
如何在 PHP 中反转字符串
如何在 PHP 中用另一个字符串替换字符串的一部分
如何在 PHP 中计算子串在字符串中出现的次数
如何在 PHP 中计算数组中的所有元素
如何在 PHP 中打印或回显数组的所有值
如何在 PHP 中显示数组的结构和值
如何在 PHP 中颠倒数组的顺序
如何在 PHP 中检查数组中是否存在值
如何在 PHP 中检查数组中是否存在键
如何在 PHP 中删除数组中的最后一个元素
如何从 PHP 数组中删除第一个元素
如何在 PHP 中为数组的开头添加元素
如何在 PHP 中为数组的末尾添加元素
如何在 PHP 中把两个或多个数组合并成一个数组
如何在 PHP 中按字母顺序对数组值排序
如何在 PHP 中删除数组中的重复值
如何在 PHP 中随机调整数组的顺序
如何在 PHP 中比较两个数组的值
如何在 PHP 中计算数组中数值的总和
如何在 PHP 中删除数组中的空值
如何在 PHP 中用数组值填充下拉列表
如何在 PHP 中获取关联数组的所有键值
如何在 PHP 中获取关联数组的所有值
如何在 PHP 中按键对关联数组排序
如何在 PHP 中按值对关联数组排序
如何在 PHP 中从数组中获取单个值
如何在 PHP 中循环浏览多维数组
如何在 PHP 中从数组中删除元素
如何在 PHP 中检查字符串是否包含特定单词
如何在 PHP 中获取当前日期和时间
如何在 PHP 中进行重定向
如何在 PHP 中删除字符串中的所有空格
如何用 PHP 获取当前年份
如何在 PHP 中将日期从 yyyy-mm-dd 转换为 dd-mm-yyyy 格式
如何在 PHP 中将字符串转换为数字
如何在 PHP 中获取数组的第一个元素
如何在 PHP 中将日期转换为时间戳
如何在 PHP 中为空数组添加元素
如何在 PHP 中把整数转换成字符串
如何用值而不是键删除 PHP 数组元素
如何在 PHP 中将键和值同时推入数组
如何使用 PHP 定期刷新页面
如何从 PHP 字符串中删除最后一个字符
如何从 PHP 脚本返回 JSON
如何让 PHP 显示错误
PHP MySQL CRUD 应用 - php7基础教程 - 笔下光年
网站首页
PHP MySQL CRUD 应用
In this tutorial you'll learn how to build a CRUD application with PHP and MySQL. ## What is CRUD CRUD is an acronym for Create, Read, Update, and Delete. CRUD operations are basic data manipulation for database. We've already learned how to perform create (i.e. insert), read (i.e. select), update and delete operations in previous chapters. In this tutorial we'll create a simple PHP application to perform all these operations on a MySQL database table at one place. Well, let's start by creating the table which we'll use in all of our example. ## Creating the Database Table Execute the following SQL query to create a table named employees inside your MySQL database. We will use this table for all of our future operations. ```sql CREATE TABLE employees ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, name VARCHAR(100) NOT NULL, address VARCHAR(255) NOT NULL, salary INT(10) NOT NULL ); ``` ## Creating the Config File After creating the table, we need create a PHP script in order to connect to the MySQL database server. Let's create a file named "config.php" and put the following code inside it. We'll later include this config file in other pages using the PHP `require_once()` function. ```php <?php /* Database credentials. Assuming you are running MySQL server with default setting (user 'root' with no password) */ define('DB_SERVER', 'localhost'); define('DB_USERNAME', 'root'); define('DB_PASSWORD', ''); define('DB_NAME', 'demo'); /* Attempt to connect to MySQL database */ $link = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME); // Check connection if($link === false){ die("ERROR: Could not connect. " . mysqli_connect_error()); } ?> ``` If you've downloaded the Object Oriented or PDO code examples using the download button, please remove the text "-oo-format" or "-pdo-format" from file names before testing the code. <div class="callout callout-info mb-3">Note: Replace the credentials according to your MySQL server setting before testing this code, for example, replace the database name 'demo' with your own database name, replace username 'root' with your own database username, specify database password if there's any.</div> ## Creating the Landing Page First we will create a landing page for our CRUD application that contains a data grid showing the records from the employees database table. It also has action icons for each record displayed in the grid, that you may choose to view its details, update it, or delete it. We'll also add a create button on the top of the data grid that can be used for creating new records in the employees table. Create a file named "index.php" and put the following code in it: ```php <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Dashboard</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> <style> .wrapper{ width: 600px; margin: 0 auto; } table tr td:last-child{ width: 120px; } </style> <script> $(document).ready(function(){ $('[data-toggle="tooltip"]').tooltip(); }); </script> </head> <body> <div class="wrapper"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <div class="mt-5 mb-3 clearfix"> <h2 class="pull-left">Employees Details</h2> <a href="create.php" class="btn btn-success pull-right"><i class="fa fa-plus"></i> Add New Employee</a> </div> <?php // Include config file require_once "config.php"; // Attempt select query execution $sql = "SELECT * FROM employees"; if($result = mysqli_query($link, $sql)){ if(mysqli_num_rows($result) > 0){ echo '<table class="table table-bordered table-striped">'; echo "<thead>"; echo "<tr>"; echo "<th>#</th>"; echo "<th>Name</th>"; echo "<th>Address</th>"; echo "<th>Salary</th>"; echo "<th>Action</th>"; echo "</tr>"; echo "</thead>"; echo "<tbody>"; while($row = mysqli_fetch_array($result)){ echo "<tr>"; echo "<td>" . $row['id'] . "</td>"; echo "<td>" . $row['name'] . "</td>"; echo "<td>" . $row['address'] . "</td>"; echo "<td>" . $row['salary'] . "</td>"; echo "<td>"; echo '<a href="read.php?id='. $row['id'] .'" class="mr-3" title="View Record" data-toggle="tooltip"><span class="fa fa-eye"></span></a>'; echo '<a href="update.php?id='. $row['id'] .'" class="mr-3" title="Update Record" data-toggle="tooltip"><span class="fa fa-pencil"></span></a>'; echo '<a href="delete.php?id='. $row['id'] .'" title="Delete Record" data-toggle="tooltip"><span class="fa fa-trash"></span></a>'; echo "</td>"; echo "</tr>"; } echo "</tbody>"; echo "</table>"; // Free result set mysqli_free_result($result); } else{ echo '<div class="alert alert-danger"><em>No records were found.</em></div>'; } } else{ echo "Oops! Something went wrong. Please try again later."; } // Close connection mysqli_close($link); ?> </div> </div> </div> </div> </body> </html> ``` Once employees table is populated with some records the landing page i.e. the CRUD data grid may look something like the picture shown below: ![PHP MySQL CRUD Interface](/uploads/images/20240507/305fa468c1033e1b115a0d5c0af336bc.png "PHP MySQL CRUD Interface") <div class="callout callout-success mb-3">Tip: We've used the Bootstrap framework to make this CRUD application layout quickly and beautifully. Bootstrap is the most popular and powerful front-end framework for faster and easier responsive web development. Please, checkout the Bootstrap tutorial section to learn more about this framework.</div> ## Creating the Create Page In this section we'll build the Create functionality of our CRUD application. Let's create a file named "create.php" and put the following code inside it. It will generate a web form that can be used to insert records in the employees table. ```php <?php // Include config file require_once "config.php"; // Define variables and initialize with empty values $name = $address = $salary = ""; $name_err = $address_err = $salary_err = ""; // Processing form data when form is submitted if($_SERVER["REQUEST_METHOD"] == "POST"){ // Validate name $input_name = trim($_POST["name"]); if(empty($input_name)){ $name_err = "Please enter a name."; } elseif(!filter_var($input_name, FILTER_VALIDATE_REGEXP, array("options"=>array("regexp"=>"/^[a-zA-Z\s]+$/")))){ $name_err = "Please enter a valid name."; } else{ $name = $input_name; } // Validate address $input_address = trim($_POST["address"]); if(empty($input_address)){ $address_err = "Please enter an address."; } else{ $address = $input_address; } // Validate salary $input_salary = trim($_POST["salary"]); if(empty($input_salary)){ $salary_err = "Please enter the salary amount."; } elseif(!ctype_digit($input_salary)){ $salary_err = "Please enter a positive integer value."; } else{ $salary = $input_salary; } // Check input errors before inserting in database if(empty($name_err) && empty($address_err) && empty($salary_err)){ // Prepare an insert statement $sql = "INSERT INTO employees (name, address, salary) VALUES (?, ?, ?)"; if($stmt = mysqli_prepare($link, $sql)){ // Bind variables to the prepared statement as parameters mysqli_stmt_bind_param($stmt, "sss", $param_name, $param_address, $param_salary); // Set parameters $param_name = $name; $param_address = $address; $param_salary = $salary; // Attempt to execute the prepared statement if(mysqli_stmt_execute($stmt)){ // Records created successfully. Redirect to landing page header("location: index.php"); exit(); } else{ echo "Oops! Something went wrong. Please try again later."; } } // Close statement mysqli_stmt_close($stmt); } // Close connection mysqli_close($link); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Create Record</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <style> .wrapper{ width: 600px; margin: 0 auto; } </style> </head> <body> <div class="wrapper"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <h2 class="mt-5">Create Record</h2> <p>Please fill this form and submit to add employee record to the database.</p> <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post"> <div class="form-group"> <label>Name</label> <input type="text" name="name" class="form-control <?php echo (!empty($name_err)) ? 'is-invalid' : ''; ?>" value="<?php echo $name; ?>"> <span class="invalid-feedback"><?php echo $name_err;?></span> </div> <div class="form-group"> <label>Address</label> <textarea name="address" class="form-control <?php echo (!empty($address_err)) ? 'is-invalid' : ''; ?>"><?php echo $address; ?></textarea> <span class="invalid-feedback"><?php echo $address_err;?></span> </div> <div class="form-group"> <label>Salary</label> <input type="text" name="salary" class="form-control <?php echo (!empty($salary_err)) ? 'is-invalid' : ''; ?>" value="<?php echo $salary; ?>"> <span class="invalid-feedback"><?php echo $salary_err;?></span> </div> <input type="submit" class="btn btn-primary" value="Submit"> <a href="index.php" class="btn btn-secondary ml-2">Cancel</a> </form> </div> </div> </div> </div> </body> </html> ``` The same "create.php" file will display the HTML form and process the submitted form data. It will also perform basic validation on user inputs (line no-11 to 37) before saving the data. ## Creating the Read Page Now it's time to build the Read functionality of our CRUD application. Let's create a file named "read.php" and put the following code inside it. It will simply retrieve the records from the employees table based the id attribute of the employee. ```php <?php // Check existence of id parameter before processing further if(isset($_GET["id"]) && !empty(trim($_GET["id"]))){ // Include config file require_once "config.php"; // Prepare a select statement $sql = "SELECT * FROM employees WHERE id = ?"; if($stmt = mysqli_prepare($link, $sql)){ // Bind variables to the prepared statement as parameters mysqli_stmt_bind_param($stmt, "i", $param_id); // Set parameters $param_id = trim($_GET["id"]); // Attempt to execute the prepared statement if(mysqli_stmt_execute($stmt)){ $result = mysqli_stmt_get_result($stmt); if(mysqli_num_rows($result) == 1){ /* Fetch result row as an associative array. Since the result set contains only one row, we don't need to use while loop */ $row = mysqli_fetch_array($result, MYSQLI_ASSOC); // Retrieve individual field value $name = $row["name"]; $address = $row["address"]; $salary = $row["salary"]; } else{ // URL doesn't contain valid id parameter. Redirect to error page header("location: error.php"); exit(); } } else{ echo "Oops! Something went wrong. Please try again later."; } } // Close statement mysqli_stmt_close($stmt); // Close connection mysqli_close($link); } else{ // URL doesn't contain id parameter. Redirect to error page header("location: error.php"); exit(); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>View Record</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <style> .wrapper{ width: 600px; margin: 0 auto; } </style> </head> <body> <div class="wrapper"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <h1 class="mt-5 mb-3">View Record</h1> <div class="form-group"> <label>Name</label> <p><b><?php echo $row["name"]; ?></b></p> </div> <div class="form-group"> <label>Address</label> <p><b><?php echo $row["address"]; ?></b></p> </div> <div class="form-group"> <label>Salary</label> <p><b><?php echo $row["salary"]; ?></b></p> </div> <p><a href="index.php" class="btn btn-primary">Back</a></p> </div> </div> </div> </div> </body> </html> ``` ## Creating the Update Page Similarly, we can build the Update functionality of our CRUD application. Let's create a file named "update.php" and put the following code inside it. It will update the existing records in the employees table based the id attribute of the employee. ```php <?php // Include config file require_once "config.php"; // Define variables and initialize with empty values $name = $address = $salary = ""; $name_err = $address_err = $salary_err = ""; // Processing form data when form is submitted if(isset($_POST["id"]) && !empty($_POST["id"])){ // Get hidden input value $id = $_POST["id"]; // Validate name $input_name = trim($_POST["name"]); if(empty($input_name)){ $name_err = "Please enter a name."; } elseif(!filter_var($input_name, FILTER_VALIDATE_REGEXP, array("options"=>array("regexp"=>"/^[a-zA-Z\s]+$/")))){ $name_err = "Please enter a valid name."; } else{ $name = $input_name; } // Validate address address $input_address = trim($_POST["address"]); if(empty($input_address)){ $address_err = "Please enter an address."; } else{ $address = $input_address; } // Validate salary $input_salary = trim($_POST["salary"]); if(empty($input_salary)){ $salary_err = "Please enter the salary amount."; } elseif(!ctype_digit($input_salary)){ $salary_err = "Please enter a positive integer value."; } else{ $salary = $input_salary; } // Check input errors before inserting in database if(empty($name_err) && empty($address_err) && empty($salary_err)){ // Prepare an update statement $sql = "UPDATE employees SET name=?, address=?, salary=? WHERE id=?"; if($stmt = mysqli_prepare($link, $sql)){ // Bind variables to the prepared statement as parameters mysqli_stmt_bind_param($stmt, "sssi", $param_name, $param_address, $param_salary, $param_id); // Set parameters $param_name = $name; $param_address = $address; $param_salary = $salary; $param_id = $id; // Attempt to execute the prepared statement if(mysqli_stmt_execute($stmt)){ // Records updated successfully. Redirect to landing page header("location: index.php"); exit(); } else{ echo "Oops! Something went wrong. Please try again later."; } } // Close statement mysqli_stmt_close($stmt); } // Close connection mysqli_close($link); } else{ // Check existence of id parameter before processing further if(isset($_GET["id"]) && !empty(trim($_GET["id"]))){ // Get URL parameter $id = trim($_GET["id"]); // Prepare a select statement $sql = "SELECT * FROM employees WHERE id = ?"; if($stmt = mysqli_prepare($link, $sql)){ // Bind variables to the prepared statement as parameters mysqli_stmt_bind_param($stmt, "i", $param_id); // Set parameters $param_id = $id; // Attempt to execute the prepared statement if(mysqli_stmt_execute($stmt)){ $result = mysqli_stmt_get_result($stmt); if(mysqli_num_rows($result) == 1){ /* Fetch result row as an associative array. Since the result set contains only one row, we don't need to use while loop */ $row = mysqli_fetch_array($result, MYSQLI_ASSOC); // Retrieve individual field value $name = $row["name"]; $address = $row["address"]; $salary = $row["salary"]; } else{ // URL doesn't contain valid id. Redirect to error page header("location: error.php"); exit(); } } else{ echo "Oops! Something went wrong. Please try again later."; } } // Close statement mysqli_stmt_close($stmt); // Close connection mysqli_close($link); } else{ // URL doesn't contain id parameter. Redirect to error page header("location: error.php"); exit(); } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Update Record</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <style> .wrapper{ width: 600px; margin: 0 auto; } </style> </head> <body> <div class="wrapper"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <h2 class="mt-5">Update Record</h2> <p>Please edit the input values and submit to update the employee record.</p> <form action="<?php echo htmlspecialchars(basename($_SERVER['REQUEST_URI'])); ?>" method="post"> <div class="form-group"> <label>Name</label> <input type="text" name="name" class="form-control <?php echo (!empty($name_err)) ? 'is-invalid' : ''; ?>" value="<?php echo $name; ?>"> <span class="invalid-feedback"><?php echo $name_err;?></span> </div> <div class="form-group"> <label>Address</label> <textarea name="address" class="form-control <?php echo (!empty($address_err)) ? 'is-invalid' : ''; ?>"><?php echo $address; ?></textarea> <span class="invalid-feedback"><?php echo $address_err;?></span> </div> <div class="form-group"> <label>Salary</label> <input type="text" name="salary" class="form-control <?php echo (!empty($salary_err)) ? 'is-invalid' : ''; ?>" value="<?php echo $salary; ?>"> <span class="invalid-feedback"><?php echo $salary_err;?></span> </div> <input type="hidden" name="id" value="<?php echo $id; ?>"/> <input type="submit" class="btn btn-primary" value="Submit"> <a href="index.php" class="btn btn-secondary ml-2">Cancel</a> </form> </div> </div> </div> </div> </body> </html> ``` ## Creating the Delete Page Finally, we will build the Delete functionality of our CRUD application. Let's create a file named "delete.php" and put the following code inside it. It will delete the existing records from the employees table based the id attribute of the employee. ```php <?php // Process delete operation after confirmation if(isset($_POST["id"]) && !empty($_POST["id"])){ // Include config file require_once "config.php"; // Prepare a delete statement $sql = "DELETE FROM employees WHERE id = ?"; if($stmt = mysqli_prepare($link, $sql)){ // Bind variables to the prepared statement as parameters mysqli_stmt_bind_param($stmt, "i", $param_id); // Set parameters $param_id = trim($_POST["id"]); // Attempt to execute the prepared statement if(mysqli_stmt_execute($stmt)){ // Records deleted successfully. Redirect to landing page header("location: index.php"); exit(); } else{ echo "Oops! Something went wrong. Please try again later."; } } // Close statement mysqli_stmt_close($stmt); // Close connection mysqli_close($link); } else{ // Check existence of id parameter if(empty(trim($_GET["id"]))){ // URL doesn't contain id parameter. Redirect to error page header("location: error.php"); exit(); } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Delete Record</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <style> .wrapper{ width: 600px; margin: 0 auto; } </style> </head> <body> <div class="wrapper"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <h2 class="mt-5 mb-3">Delete Record</h2> <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post"> <div class="alert alert-danger"> <input type="hidden" name="id" value="<?php echo trim($_GET["id"]); ?>"/> <p>Are you sure you want to delete this employee record?</p> <p> <input type="submit" value="Yes" class="btn btn-danger"> <a href="index.php" class="btn btn-secondary">No</a> </p> </div> </form> </div> </div> </div> </div> </body> </html> ``` ## Creating the Error Page At the end, let's create one more file "error.php". This page will be displayed if request is invalid i.e. if id parameter is missing from the URL query string or it is not valid. ```php <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Error</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <style> .wrapper{ width: 600px; margin: 0 auto; } </style> </head> <body> <div class="wrapper"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <h2 class="mt-5 mb-3">Invalid Request</h2> <div class="alert alert-danger">Sorry, you've made an invalid request. Please <a href="index.php" class="alert-link">go back</a> and try again.</div> </div> </div> </div> </div> </body> </html> ``` After a long journey finally we've finished our CRUD application with PHP and MySQL. We recommend you to check out [PHP & MySQL database](http://www.bixiaguangnian.com/manual/php7/4000.html "PHP & MySQL database") tutorial section from the beginning, if you haven't already covered, for a better understanding of each and every part of this tutorial.
上一篇:
PHP MySQL Delete
下一篇:
PHP MySQL Ajax 搜索