hi..i am new to the editor concepts.i used fckeditor to change the fonts for php.i used php object to implement it with the textarea i am able to do that.but when i enter the data to the database in a paragraph its working fine.but if i enter suppose
line1
line2
line3.. its taking the space. so what i did while entering the data only i tried to remove the space using the trim () and addslases().i tried all the possiblites. and then to find the stringlength but still its taking the same with counting the space..
i want my data to appear as :line1line2line3.. because later i need to find the substr() upon the inserted data so..please anyone help me.. here is my code:
<?php
include_once("fckeditor/fckeditor.php") ;
include("connection.php");
if(isset($_POST['Submit']))
{
$title=$_POST['title'];
$des1=$_POST['descr'];
/*$des=addcslashes($des1);*/
$des=addcslashes($_POST['descr'],"\x00..\x1f\x22\x27\x5c");
echo $q="insert into xyz(descr)values('$des')";
echo $r=mysql_query($q);
}
?>
this is fck code:
<?php
$oFCKeditor=new FCKeditor('descr') ;
$oFCKeditor->BasePath='../fckeditor/';
echo $oFCKeditor->Value=addslashes(html_entity_decode($oFCKeditor->descr));
$oFCKeditor->Width = '700px' ;
$oFCKeditor->Height = '350px' ;
$oFCKeditor->Create() ;
?>
please give ur suggestion.. hw can i do that.
regards






Bookmarks