Hi there,
got fckeditor ready to use...
but got one problem saving my data..
this is my php.. but the data isn't saved.
anyone got an idea why?..
<?php include("../../fckeditor.php") ; ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<link href="../sample.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function FCKeditor_OnComplete( editorInstance )
{
var oCombo = document.getElementById( 'cmbToolbars' ) ;
oCombo.value = editorInstance.ToolbarSet.Name ;
oCombo.style.visibility = '' ;
}
</script>
<?
if ($_POST['submit']) {
$fp = fopen("../../../ud/whois/whois.txt", "w");
fwrite($fp, stripslashes($_POST['newdata']));
fclose($fp);
}
$fp = fopen("../../../ud/whois/whois.txt", "r");
while (!feof($fp)) {
$data .= fgets($fp, 4096);}
fclose($fp);
?>
</head>
<body>
<br>
<form action="<? print $PHP_SELF; ?>" method="post">
<?php
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
$sBasePath = $_SERVER['PHP_SELF'] ;
$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;
$oFCKeditor = new FCKeditor('newdata') ;
$oFCKeditor->BasePath = $sBasePath ;
if ( isset($_GET['Toolbar']) )
$oFCKeditor->ToolbarSet = htmlspecialchars($_GET['Toolbar']);
$oFCKeditor->Value = $data ;
$oFCKeditor->Create() ;
?>
<br>
<input type="submit" value="submit">
</form>
</body>
</html>