Php 如何在fckeditor中编辑内容

Php 如何在fckeditor中编辑内容,php,html,database,forms,fckeditor,Php,Html,Database,Forms,Fckeditor,这是我的密码。我想在fckeditor中编辑内容或值。此代码正在运行insert和select查询,但无法更新。请帮我把它放回去 下面是从数据库接收id以选择记录 <?php if (isset($_REQUEST['editncontent'])) { $editnews = new DBConnection(); $condition = "WHERE id = '".$_REQUEST['editncontent']."'";

这是我的密码。我想在fckeditor中编辑内容或值。此代码正在运行insert和select查询,但无法更新。请帮我把它放回去

下面是从数据库接收id以选择记录

<?php 
    if (isset($_REQUEST['editncontent'])) {
        $editnews  = new DBConnection();
        $condition = "WHERE id = '".$_REQUEST['editncontent']."'";
        $selnews   = $editnews->SelectRecord(array("*"),"pages","$condition");

        while ($getnews = mysql_fetch_array($selnews)){ ?>
            <form action="" method="post">
            <?php
                $oFCKeditor = new FCKeditor('FCKeditor1');
                $oFCKeditor->BasePath = 'fckeditor/';
                $oFCKeditor->Width = 740;
                $oFCKeditor->Height = 600;
                $oFCKeditor->Value  = $getnews['content'];
                echo $oFCKeditor->Create();
            ?>
            </form>
<?php } } ?>

// Now it takes the parameter and going to update it         
// Update query

<?php  
    if (isset($_REQUEST['content'])) {
        $content = mysql_real_escape_string(trim($_POST['FCKeditor1']));

        $obj        = new DBConnection();
        $arr_field  = array("content");
        $arr_values = array("$content");
        $condition  = "WHERE id = '".$_REQUEST['editncontent']."'";
        $update     = $obj->UpdateRecord(
            "pages",$arr_field,$arr_values,"$condition"
        ) or die(mysql_error());
        header("Location:showpages.php");
    }
    ob_flush();
?>

我无法编辑fckeditor中的值。它将使用select查询在fckeditor中显示该值,但无法更新该值。这就是问题所在,欢迎来到这里。请清理代码,使其更具可读性,并尽量避免出现水平滚动条。谢谢您。