【php开源代码栏目提醒】:以下是网学会员为您推荐的php开源代码-delnews.php,希望本篇文章对您学习有所帮助。
<?php
require("auth.php");
if(!$id){
$title = "No ID to Delete";
include("header.php");
echo "$title";
include("footer.php");
exit;
}
require("functions.php");
db_connect();
$sqldel = "DELETE FROM fubonews WHERE id='$id'";
if(mysql_query($sqldel)){
$title = "新闻删除成功";
include("header.php");
echo "$title<br>
<a href=\"index.php\">返回功能菜单</a>";
}
elseif(!my
sql_query($sqldel)){
mysql_error() . "<br>不能删除该新闻";
mysql_close();
exit;
}
mysql_close();
?>