【php开源代码栏目提醒】:网学会员php开源代码为您提供fckedit.php参考,解决您在fckedit.php学习中工作中的难题,参考学习。
<?php
ob_start();
include("global.php");
include('../include/dbconnect.inc.php');
echo <<<EOHTML
<link type="text/css" rel="stylesheet" href="style.css">
<div id="maintable">添加文章</div>
EO
HTML;
$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 = "insert into content(cid,title,author,posttime,key1,key2,key3,body) values('$cid','$title','$author','$posttime','$key1','$key2','$key3','$body')";
$rs =
mysql_query($
sql);
if($rs) {
header("location:article_list.php");
} else {
echo "文章添加出错!";
}
?>