【php开源代码栏目提醒】:网学会员为需要php开源代码的朋友们搜集整理了edit_db.php相关资料,希望对各位网友有所帮助!
<?php
ob_start();
include("global.php");
?>
<link type="text/css" rel="stylesheet" href="style.css">
<div id="maintable">编辑文章</div>
<?php
include('../include/dbconnect.inc.php');
$id = $_POST['id'];
$cid = $_POST['cid'];
$title = $_POST['title'];
$author = $_POST['author'];
$key1 = $_POST['key1'];
$key2 = $_POST['key2'];
$key3 = $_POST['key3'];
$posttime = date("Y-m-d H:i:s");
$body = $_POST['body'];
$sql = "update content set cid='$cid',title='$title',author='$author',posttime='$posttime',key1='$key1',key2='$key2',key3='$key3',body='$body' where id='$id'";
$rs =
mysql_query($
sql);
if($rs) {
header("location:article_list.php");
} else {
echo "文章编辑出错,点击<a href='article.list.php'>这里</a>返回文章管理页面!";
}
?>