Hey CKeditor friends,
I need help.
All I want to do is have the Value of the editor be populated dynamically with a php/sql variable. Try as I may, nothing works. My first instinct on how to code this is as follows:
<?php $edi = $_GET["edi"]; include '../library/config.php'; include '../library/opendb.php'; $result = mysql_query("SELECT * FROM tbannouncements WHERE id LIKE '$edi'"); while($r=mysql_fetch_array($result)) { $sn=$r["sn"]; $name=$r["name"]; $title=$r["title"]; $description=$r["description"]; $oFCKeditor = new FCKeditor('FCKeditor1') ; $oFCKeditor->BasePath = 'http://www.google.ca/fckeditor/' ; $oFCKeditor->Value = '<?php echo"$description"; ?>' ; $oFCKeditor->Create() ; } include '../library/closedb.php'; ?>
However, That attempt returns an empty editor. What I am trying to accomplish seems so rudimentary- Yet, I can't find the solution anywhere. I've searched this forum as well as others- I've googled and I've read documentation. Heck, I've even just sat here trying different things on my own. Still nothing.
I'd appreciate any help.
THANK YOU!
Re: CKeditor Value as php $variable.
Figured it out on my own.
Here is my solution: