Hi! I'm a newbie. I need your help on this. As a surf around the Web looking for editors i have found this FCKeditor. Can you help me please on how to configure it?
i have a PHP form with textarea. How would i replace that textarea with the editor? I already installed FCkeditor but I can't just make it working.
i have her my form script
<?php
if($_POST['submit']){
//connect to database script here
$saveme=mysql_query("insert into table1 (content) values ('$_POST[editor]')") or die (mysql_error());
}
?>
<html>
<head>
<title>FCk Editor test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<form method="post">
<textarea name="editor" id="editor"></textarea>
<input type="submit" value="Submit" name="submit">
</form>
</body>
</html>
Anyhelp is much appreciated. Thank you.
Thu, 12/18/2008 - 19:52
#1
Re: Newbie needs help! How to configure the fckeditor?
just follow the steps in http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Integration/PHP even though I actually use the JS integration on my PHP Jobs site.
Re: Newbie needs help! How to configure the fckeditor?
i already follow that one but i can't make it work. I want to replace this part here with a texarea.
<?php
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = '/fckeditor/' ;
$oFCKeditor->Value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ;
$oFCKeditor->Create() ;
?>
How would i do it? Or let's say what would be the synthax if i call the fckeditor with my form below? please?
<?php
include_once("fckeditor/fckeditor.php") ;
if($_POST['submit']){
//connect to database script here
$saveme=mysql_query("insert into table1 (content) values ('$_POST[editor]')") or die (mysql_error());
}
?>
<html>
<head>
<title>FCk Editor test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<form method="post">
<textarea name="editor" id="editor"></textarea>
<input type="submit" value="Submit" name="submit">
</form>
</body>
</html>
Re: Newbie needs help! How to configure the fckeditor?
$oFCKeditor = new FCKeditor('FCKeditor1') ;
to
$oFCKeditor = new FCKeditor('editor') ;
OR change
$saveme=mysql_query("insert into table1 (content) values ('$_POST[editor]')") or die (mysql_error());
to
$saveme=mysql_query("insert into table1 (content) values ('$_POST[FCKeditor1]')") or die (mysql_error());