Can anyone help me and tell me what is wrong with my code? The FCKeditor picks the db stored value right, but it wont write to it and make changes...
You can see it here: http://www.livskallan.nu/test/meditation_admin.php
The code looks like this:
------------------------------------------------------------------------
<?php function input() { $DocumentInfo=addslashes($this->DocumentInfo); $connect = mysql_connect ("localhost", "livskallan", "gfdsa") or die (mysql_error()); $databas = mysql_select_db("livskallan"); $sql = "UPDATE meditation SET DocumentInfo = '$DocumentInfo'"; mysql_query("$sql"); mysql_close($connect); } function show_result() { $connect = mysql_connect ("localhost", "livskallan", "gfdsa") or die (mysql_error()); $databas = mysql_select_db("livskallan"); $sql = "SELECT * FROM meditation"; $result = mysql_query("$sql"); $rad=mysql_fetch_row($result); include("../FCKeditor/fckeditor.php") ; ?>
RE: Problem using FCKeditor with MySQL
should be:
$oFCKeditor->Value = $rad[0];
if you need to keep the magic quotoes then you need:
$oFCKeditor->Value = "{$rad[0]}";