I am trying to get the Value to output a Database entry in the textarea as the value for updating the form:
This is the original code:
It works fine and updates great, however, I have just started using FCKEDITOR and now I want the value of the text area to contain the database field `testimony_description`
Here is my replacement code:
What do I need to add to $hello->Value to get the database field testimony_description to output in the text area value?
This is the original code:
<textarea name="testimony_description" cols="80" rows="30" class="box" id="testimony_description"><?php echo($onenav->testimony_description);?></textarea>
It works fine and updates great, however, I have just started using FCKEDITOR and now I want the value of the text area to contain the database field `testimony_description`
Here is my replacement code:
<?php $hello = new FCKeditor('testimony_description') ; $hello->Height = '600'; $hello->BasePath = '/admin/fckeditor/'; $hello->Value = '$testimony_description'; $hello->Create() ; ?>
What do I need to add to $hello->Value to get the database field testimony_description to output in the text area value?
Re: PHP Value Output in FCKEDITOR Value
Re: PHP Value Output in FCKEDITOR Value
Re: PHP Value Output in FCKEDITOR Value
Cheers!
Re: PHP Value Output in FCKEDITOR Value
Have you tried a query to your database to retrieve the value? I'm assuming you're using PHP/MySQL. Take a look at this very simplistic MySQL query:
http://www.tizag.com/mysqlTutorial/mysqlquery.php
Once you have successfully connected to your database and executed your query, you can use:
$hello->Value = $row['testimony_description'];
Hope that helps.
Re: PHP Value Output in FCKEDITOR Value
$hello->Value = $onenav->testimony_description;
Re: PHP Value Output in FCKEDITOR Value
$hello->Value = '$testimony_description';
SHOULD BE --->
$hello->Value = $testimony_description;
PHP does not recognize variables inside of single quotes. It does with double quotes though.