Hi everyone, I've installed FCK 1.6 and am able to insert editor changes, via php, to a mysql database. But when I refresh/re-call the FCK editor i get the following:
<P>this is a <A href="http://www.test.com" target=_parent>test </A><BR><STRONG>how about bold</STRONG></P>
this is using the javascript version. I've also tried the php verison and get the same results. Any Ideas?
here is my code in the javascript version:
<!-- CONTENT START -->
<br>
<?php
$gid=$_SESSION['gid'];
$sql="select test from testing where id=$id";
$result = mysql_query($sql);//send query to the db
$row = mysql_fetch_array($result);
$mission=$row[0];
//echo $mission;
?>
<form name="form1" action="../process.php" method="post" language="javascript">
<strong>Editor</strong><br><br>
<script language="javascript">
<!--
var oFCKeditor ;
oFCKeditor = new FCKeditor('EditorDefault') ;
oFCKeditor.BasePath = '/editor/' ; // '/FCKeditor/' is the default value so this line could be deleted.
//oFCKeditor.Value = 'This is some <B>sample text</B>.' ;
oFCKeditor.Value = '<P>this is a <A href="http://google.com" target=_blank>test </A><BR><STRONG>how about bold</STRONG></P>' ;
<?php
//echo "oFCKeditor.Value = '$mission' ;";
?>
oFCKeditor.Config['StyleNames'] = ';Style 1;Style 2; Style 3' ;
oFCKeditor.Config['ToolbarFontNames'] = ';Arial;Courier New;Times New Roman;Verdana' ;
oFCKeditor.Create() ;
//-->
</script>
<input type="hidden" name="process_type" value="missionStatement">
<br><br><br>
<input type="submit" value="Update">
<br>
</form>
<!-- CONTENT END -->
here is the code from the php version:
<?php $gid=$_SESSION['gid']; $sql="select test from testing where id=$id"; echo "sql is: $sql<br>"; $result = mysql_query($sql);//send query to the db $row = mysql_fetch_array($result); $mission=$row[0]; echo "mission is: $mission<br>"; ?>
<form action="testsubmit.php" target="_blank" method="post" language="javascript">
<BR>
<BR>
FCKeditor - Default Toolbar Set<BR>
<?php $oFCKeditor = new FCKeditor ; $oFCKeditor->BasePath = '/editor/' ; // '/FCKeditor/' is the default value so this line could be deleted. //$oFCKeditor->Value = 'This is some <B>sample text</B>.' ; $oFCKeditor->Value = $mission ; $oFCKeditor->CreateFCKeditor( 'EditorDefault', '100%', 150 ) ; ?>
<BR>
<BR>
<INPUT type="submit" value="Submit Data">
<BR>
</form>
RE: FCK 1.6 - editor data from mysql
a piece of the javascript code that I previously posted was commented out for testing that didnt' help...heres what that piece thats giving me problems:
//oFCKeditor.Value = '<P>this is a <A href="http://google.com"; target=_blank>test </A><BR><STRONG>how about bold</STRONG></P>' ;
<?php echo "oFCKeditor.Value = '$mission' ;"; ?>
RE: FCK 1.6 - editor data from mysql