<?php
include("function.php");
// $db = new mysql($host,$name,$pass,$table,$ut);
$fck = new FCKeditor('FCKeditor3');
$sBasePath = '../includes/fckeditor/';
$fck->BasePath = $sBasePath;
$fck->Width = '75%';
$fck->Height = '300';
if($_POST[sub]){
mysql_connect("localhost","root","root");
mysql_query("SET NAMES 'gbk'");
mysql_query("INSERT INTO `blog`.`blog_comment` (`cid` ,`c_title` ,`c_ding` ,`c_comment` ,`c_author` )
VALUES (NULL , '".$_POST[title]."', '".$_POST[ding]."', '".$_POST[FCKeditor3]."', '".$_POST[author]."');");
}
?>
<form action="newsadd.php" method="post" >
文章标题:<input type="text" name="title" /><br />
文章是否置顶:<input type="checkbox" name="ding" value="1" /><br />
文章作者:<input type="text" name="author" /><br />
<?php
$fck->Create();
?>
<input type="submit" name="sub" value="发表文章"/><br />
</form>
不提示错误 但没插入数据 新手求解
include("function.php");
// $db = new mysql($host,$name,$pass,$table,$ut);
$fck = new FCKeditor('FCKeditor3');
$sBasePath = '../includes/fckeditor/';
$fck->BasePath = $sBasePath;
$fck->Width = '75%';
$fck->Height = '300';
if($_POST[sub]){
mysql_connect("localhost","root","root");
mysql_query("SET NAMES 'gbk'");
mysql_query("INSERT INTO `blog`.`blog_comment` (`cid` ,`c_title` ,`c_ding` ,`c_comment` ,`c_author` )
VALUES (NULL , '".$_POST[title]."', '".$_POST[ding]."', '".$_POST[FCKeditor3]."', '".$_POST[author]."');");
}
?>
<form action="newsadd.php" method="post" >
文章标题:<input type="text" name="title" /><br />
文章是否置顶:<input type="checkbox" name="ding" value="1" /><br />
文章作者:<input type="text" name="author" /><br />
<?php
$fck->Create();
?>
<input type="submit" name="sub" value="发表文章"/><br />
</form>
不提示错误 但没插入数据 新手求解
VALUES (NULL , '".$_POST[title]."', '".$_POST[ding]."', '".$_POST[FCKeditor3]."', '".$_POST[author]."');===========》
"INSERT INTO `blog`.`blog_comment` (`cid` ,`c_title` ,`c_ding` ,`c_comment` ,`c_author` )
VALUES ('' , '".$_POST[title]."', '".$_POST[ding]."', '".$_POST[FCKeditor3]."', '".$_POST[author]."')"