Jump to content

CK editor


shwetapandit

Recommended Posts

Did you look here first before posting

http://docs.ckeditor.com/#!/guide/dev_installation

 

Did you look here first before posting

http://docs.ckeditor.com/#!/guide/dev_installation

thanks for help. i got it now.But how to display the textarea content from database using ckeditor.

Link to comment
https://forums.phpfreaks.com/topic/284383-ck-editor/#findComment-1460689
Share on other sites

i did it.......

 

 

<html>
<head>
<script src="../ckeditor.js"></script>
</head>
<?php
$conn=mysql_connect("localhost","root","")or die(mysql_error());
mysql_select_db("regis")or die(mysql_error());
print_r($_GET);
$p_id=$_GET['p_id'];
$query=mysql_query("SELECT p_content FROM admin_page WHERE p_id='$p_id'")or die(mysql_error());
$row=mysql_fetch_array($query,MYSQL_ASSOC);
?>
<textarea cols="80"  id="p_content" name="p_content" rows="10" >

    <?php echo $row['p_content']; ?>

</textarea>


//print_r ($row['p_content']);



</html>

Link to comment
https://forums.phpfreaks.com/topic/284383-ck-editor/#findComment-1460692
Share on other sites

<html>
<head>
<script src="http://localhost:81/assignment/ckeditor/ckeditor.js"></script>
</head>
<body>
<div style='padding-top:50px'>
  CKEDITOR:
<div>
<div>
<?php
$conn=mysql_connect("localhost","root","")or die(mysql_error());
mysql_select_db("regis")or die(mysql_error());
$p_id=$_GET['p_id'];
$query=mysql_query("SELECT p_content FROM admin_page WHERE p_id='$p_id'")or die(mysql_error());
$row=mysql_fetch_array($query,MYSQL_ASSOC);
?>
<textarea cols="80"  id="p_content" name="p_content" rows="10" >

    <?php echo $row['p_content']; ?>

</textarea>
</div>
<script type='text/javascript'>
      CKEDITOR.replace( 'p_content' );
</script>

</body>





</html>

Link to comment
https://forums.phpfreaks.com/topic/284383-ck-editor/#findComment-1460704
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.