php and FCKEditor - Help needed
<html>
<head>
<title>FCKeditor - Samples - Posted Data</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" />
</head>
<body>
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
<form action="testpage.php" method="POST">
<tr>
<td>Administrator</td>
</tr>
<?php
$postArray = &$_POST ;
foreach ( $postArray as $sForm => $value )
{
$postedValue = htmlspecialchars( stripslashes( $value ) ) ;
?>
<tr>
<td width="100%"><textarea name="content_1" ><?=$postedValue?></textarea></td>
</tr>
<?php
}
$postArray = &$_POST ;
foreach ( $postArray as $sForm => $value )
{
$postedValue = htmlspecialchars( stripslashes( $value ) ) ;
?>
<tr>
<td width="100%"><textarea name="content_2" ><?=$postedValue?></textarea><input type="button" onclick="open.window('editor.php?contentid=1','',400,600);" name="editor_1" value="Editor"></td>
</tr>
<?php
}
?>
</form>
</table>
</body>
</html>
+++++++++++++++
then when a user clicks onto the editor button
second slab of code:
+++++++++++++++++++++++++++++++++
<?php
include("../../fckeditor.php") ;
?>
<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" />
</head>
<body>
<form action="sampleposteddata.php" method="post" target="_blank">
<?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('FCKeditor1') ;
$oFCKeditor->BasePath = $sBasePath ;
$oFCKeditor->Value = '' ;
$oFCKeditor->Create() ;
?>
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>