Jump to content

how to display the textarea content from database using ckeditor


shwetapandit

Recommended Posts

how to display the textarea content from database using ckeditor. i did it with php as below and it works perfect but how to do same in ckeditor.Any idea.......:

 

<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);
print_r ($row['p_content']);


?>

</html>

 

i did it now........

 

 

 

<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>

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.