Link to home
Start Free TrialLog in
Avatar of huang_ck
huang_ck

asked on

FCKeditor value

After I type something in FCKeditor and save it in database. I output it in FCKeditor, it show a code format but not html. What can I do.

My code is showed as below

if ( isset( $_POST ) )
      {   $postArray = &$_POST ;                  // 4.1.0 or later, use $_POST
            
            foreach ( $postArray as $sForm => $value )
            {      
                  if ( get_magic_quotes_gpc() )
                        $postedValue = htmlspecialchars( stripslashes( $value ) ) ;
                  else
                        $postedValue = htmlspecialchars( $value ) ;

                  //$data .= $value;
                  $data .= $postedValue;
            }

            $insert_sql_data = array('content' => $data);
}

.....
$oFCKeditor->Value = $rs['content'] ;
Avatar of Gitcho
Gitcho

I believe that anything typed the FCKeditor form is saved as text.  It is not parsed by the php engine unless you eval() the code after retrieving it from the database.

http://ca3.php.net/manual/en/function.eval.php
ASKER CERTIFIED SOLUTION
Avatar of Kosta
Kosta

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Forced accept.

Computer101
EE Admin