I need help..
The first slab of php refers to the admin screen:
+++++++++++++++++++++++++++++++
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<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") ;
?>
<!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" />
</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>
++++++++++++++++++++++++++++
Now the question I need answering is how do I pass previous content from the textarea of say Content_1 back into the FCKEditor popup..
Secondly when I click on the submit button in the popup, the editor popup won't close and both textareas in the parent admin screen gets populated with the same content..
Can anyone help me with this.. It is the last thing I need fixed for my little content management system..
Cheers
Corporate007