Home >Backend Development >PHP Tutorial >Simulate the effects of common database operations

Simulate the effects of common database operations

WBOY
WBOYOriginal
2016-08-08 09:32:371019browse

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>

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;
}
?>

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.

Statement:
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