Jump to content

how to display the textarea content from database using ckeditor


shwetapandit
Go to solution Solved by 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>

 

Link to comment
Share on other sites

  • Solution

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>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.