我在添加商品时,增加一个“特殊说明”字段,要求页面和“详细描述”一样, 
我也在数据库中加入了“特殊说明”字段goods_spec
同时我在admin\templates\goods_info.htm中添加了
         <span class="tab-back" id="gallery-tab">{$lang.tab_gallery}</span>
        <span class="tab-back" id="linkgoods-tab">{$lang.tab_linkgoods}</span>{if $code eq ''}
        <span class="tab-back" id="groupgoods-tab">{$lang.tab_groupgoods}</span>{/if}
        <span class="tab-back" id="article-tab">{$lang.tab_article}</span>
        <span class="tab-back" id="special-tab">特殊说明</span>      注,我把id改为special-tab还在goods_info.htm中添加了       <!-- 详细描述 -->
        <table width="90%" id="detail-table" style="display:none">
          <tr>
            <td>{$FCKeditor}</td>
          </tr>
        </table>
        
         <!-- 特殊说明-->
        <table width="90%" id="special-table" style="display:none">
          <tr>
            <td>{$FCKeditor}</td>
          </tr>
        </table>

我php文件未改,现在我弄不懂$FCKeditor  ,我只改这些,在添加商品时(没有添加“特殊说明”),居然连详细描述也添加不了了,为什么$FCKeditor输入的内容就是指“详细描述”的字段,它们是在哪里设置的?
请高手们帮帮忙,我想知道$FCKeditor的赋值
,帮帮我吧,我是新手新手新新手,让我尽快完成"特殊说明",谢谢了

解决方案 »

  1.   

    不明白啊?能不能再讲清楚点?是不是取不到fck的值??
      

  2.   

    调用FCK:
    <?php
      include_once("Edit/FCKeditor/fckeditor.php");
      $edit=new FCKeditor("message");
      $edit->BasePath="Edit/FCKeditor/";
      $edit->create();
    ?>取该FCK传递过来的值
    <?php
    $message = $_POST['message'];
    if($_POST['message'])
    {
    echo "message:".$message."<br/>";
    }
    ?>
      

  3.   

    调用FCK: 
    首先你先将fck网络编辑器放在你的目录下,在页面中使用楼上方法调用fck,这样就可以在模板里取得用户输入的值了
      

  4.   

    调用Fckeditor:(从Form开始)<form action="posteddata.php" method="post">
    <?php
    $sBasePath = $_SERVER['PHP_SELF'] ;
    $sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;$oFCKeditor = new FCKeditor('FCKeditor1') ;
    $oFCKeditor->BasePath = $sBasePath ;
    if ($_GET['toolbar'] == 'Basic') {
        $oFCKeditor->ToolbarSet = 'Basic';
    }$oFCKeditor->Value = '';
    $oFCKeditor->Create() ;
    ?>
    <br />
    <input type="submit" value="Submit">
    </form>
    获取值<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
    <tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
    <td nowrap>Field Name&nbsp;&nbsp;</td>
    <td>Value</td>
    </tr>
                <?php            if ( isset( $_POST ) )
                   $postArray = &$_POST ; // 4.1.0 or later, use $_POST
                else
                   $postArray = &$HTTP_POST_VARS ; // prior to 4.1.0, use HTTP_POST_VARS            foreach ( $postArray as $sForm => $value )
                {
                    //输出的部分包含字符串,即输出HTML源码
                    $postedValue = htmlspecialchars( stripslashes( $value ) ) ;                //过滤掉HTML标签
                    //$postedValue = stripslashes( $value ) ;
                ?>
    <tr>
    <td valign="top" nowrap><b><?=$sForm?></b></td>
    <td width="100%"><?=$postedValue?></td>
    </tr>
            <?php
            }
            ?>
    </table>