Just started working with FCKeditor for a PHP application. Seems like a good solution for my needs but I am looking for help changing the path to where the FCK html is stored and to populate FCK text fields with the html if there is already a url stored in the db.
The following gives me results: The correct text from the included html doc stored in the database is printed ABOVE the text field but not in it.
if (isset($_GET['nid'])) {
$nid = $_GET['nid'];
require_once('./mysql_connect.php');
$query = "SELECT feature FROM newsletter WHERE news_id='$nid'";
$result = @mysql_query($query);
if($result) {
$row = @mysql_fetch_array($result, MYSQL_NUM);
$feature = $row[0];
if ($feature == 'Y') { //Check if field should be included in this form
$oFCKeditor = new FCKeditor('fa') ;
$oFCKeditor->BasePath = './FCKeditor/';
$oFCKeditor->ToolbarSet = 'Basic' ;
require_once ('./mysql_connect.php');
$query1 = "SELECT feature_url FROM newsletter WHERE news_id = '$nid'";//Get the url
$result1 = @mysql_query ($query1);
if($result1) {
$row1 = mysql_fetch_array ($result1, MYSQL_NUM);
if ($row1) {
$fa_url = $row1[0];
$oFCKeditor->Value = include ($fa_url);
}
} else {
$oFCKeditor->Value = 'Feature Article Content';
}
$oFCKeditor->Width = '450' ;
$oFCKeditor->Height = '600' ;
$oFCKeditor->Create();
} else {
echo 'No Feature Article is included in this issue.';
}
}
} echo mysql_error();
How can I get the include file to print within the text area? Secondly how do I set the path to the directory where i want the uploaded files stored?
Any knowledge appreciated.
Thanks