Jump to content

[SOLVED] Syntax Help


ballouta

Recommended Posts

I am working on fck Editor

everything is ok But i am not able to view the default value that i have read from my Database.

 

the original editor syntax is:

 

$oFCKeditor->Value = 'Biography Goes here' ;

 

while i want to make smthg like this:

 

echo " $oFCKeditor->Value= '$row[cont]' ; ";

 

how i can fix the syntax so the value is assigned correctly?

 

thank you

Link to comment
Share on other sites

Your using the wrong field, I think value used to display text in your editor by default

 

If you haven't renamed the editor (presuming you haven't) use

 

$post = ($_POST['FCKeditor1']) 

 

Then do whatever with the variable

Link to comment
Share on other sites

this post code is correct and it is working,

But i want to read teh old text stored in my database and set it as the default value for the text editor to edit.

 

I want to add the $row[cont] instead of 'text goes here'!

 

this is my full code:

<?php
	include ('../global.inc.php');
	include("../fckeditor/fckeditor.php") ;


	$result = mysql_query ("SELECT * FROM `sections` WHERE `section` = 'biography' AND `lang` = 'E'");
	$row = mysql_fetch_array ($result); 

         echo "<input name='title' type='text' size='28' value='$row[title]' dir='ltr' />
         <input type='hidden' name='language' value='E' />
                  </label>
                  <br />
                <p>Biography Text<br />";

$content = $row[cont];

$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath	= '../fckeditor/' ;
$oFCKeditor->Value = 'Text Goes here' ;
$oFCKeditor->Create() ;

		  
		  ?>

<input name="" type="image" src="../images/bt_submit.gif" />
</form>

 

thanks alot

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.