deleteproduct.php
来自「《PHP专业项目实例开发》源代码」· PHP 代码 · 共 49 行
PHP
49 行
<html>
<head>
<title>Delete Product </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?php
if(!isset($productid)) { die("Product ID not submitted!"); } if(empty($productid)) { die("Product ID empty!"); } $host=""; $username="root"; $password=""; $database="books"; $x=mysql_connect($host,$username,$password);
$x1=mysql_select_db($database);
$query="delete from products where productid ='".$productid."'";
$result=mysql_query($query); if($result) { echo "Product record deleted from Products table.<br>\n"; } else { echo "Product record was not in Products table!<br>\n"; }echo " Product record in Orders table left Intact !<br>";?>
<br><br>To return to Admin page <A href="index.htm"> Click here! </a><br><br></body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?