Simulate the effects of common database operations

WBOY
Release: 2016-08-08 09:32:37
Original
967 people have browsed it

index.php: Used to display basic operations:


<h2>常用原子操作</h2>
<a href="check.php?action=add">执行添加操作</a><br><br>
<a href="check.php?action=delete">执行删除操作</a><br><br>
<a href="check.php?action=search">执行查找操作</a><br><br>
<a href="check.php?action=update">执行更新操作</a><br><br>
Copy after login

check.php: Hit the atomic operation option and a dialog box will pop up. The effect is as follows:


<?php
$action=$_GET["action"];
switch($action)
{
	case "delete":
		echo "<script>alert('现在可以执行删除操作');</script>";
		break;
	case "add":
		echo "<script>alert('现在可以执行添加操作');</script>";
		break;
	case "search":
		echo "<script>alert('现在可以执行查找操作');</script>";
		break;
	case "update":
		echo "<script>alert('现在可以执行更新操作');</script>";
		break;
}
?>
Copy after login

The above has introduced the effects of simulating common database operations, including aspects of the process. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template