0 Replies - 201 Views - Last Post: 08 May 2012 - 03:53 AM

#1 meghaphp  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 08-May 12

ckeditor not showing value from detabase

Posted 08 May 2012 - 03:53 AM

Hello everyone, I am having trouble showing the ckeditor on a php webpage. I am using Firefox 8.0.1 on a windows 7 machine with Javascript enabled.
Here is the code below--

<?php
  require_once 'header.php';

  $sqlFieldName = "SELECT * FROM `static_pages` WHERE `static_pages_id` = '14'";
  $sqlQry = mysql_query($sqlFieldName);
  $resFieldName = mysql_fetch_array($sqlQry);
  ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Patty Cake</title>
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<link rel="stylesheet" type="text/css" href="css/pancakeCSS.css" /> 
</head>
<body>
<h1>Hello World</h1>
  		<textarea class="ckeditor" id="editor1"  name="editor1"><?php echo $resFieldName['description']; ?></textarea> 
  
 <?php 
include_once "ckeditor/ckeditor.php";
$CKEditor = new CKEditor();          // Create a class instance.
//$CKEditor->returnOutput = true;
$CKEditor->basePath = 'ckeditor/';  // Path to the CKEditor directory.
$CKEditor->config[width] = 600;    // Set global configuration (used by every instance of CKEditor).
$CKEditor->textareaAttributes = array("cols" => 40, "rows" => 10);  // Change default textarea attributes.
// Create the first instance.
$CKEditor->config[contentsCss] = 'ckeditor/contents.css';
?> 


 <form id="chuck" name="chuck" method="post" action="indexAB.php">
      <p>
		My Editor:
      </p>
        
			
      <script type="text/javascript">
	       CKEDITOR.replace( 'editor1' );  
      </script> 
			
      <input type="submit" />
		
 </form>


</body>
</html>


MOD EDIT: Added code tags. When posting code...USE CODE TAGS!!!

:code:

This post has been edited by JackOfAllTrades: 08 May 2012 - 03:56 AM


Is This A Good Question/Topic? 0
  • +

Page 1 of 1