hi,
Im trying to create a kind of content updating system where on selecting a select box the page text is loaded in to the fckeditor and modifying the same and submitting would upload the database from where i pull out the text to be displayed on the website.
i have got everything rite and set up i can see the text on the next page which is being sent by the form with the variable FCKeditor01 as post method.
along with the url i would also want the value of the select box that has been selected inorder to help me write the query for which page the content has to be changed..... below is my code
<?php include ('fckeditor/fckeditor.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <META HTTP-EQUIV="imagetoolbar" CONTENT="no"> <title>ADMIN Mytime Inc</title> <script type="text/javascript"> function DisplayContent( textid ) { window.location.href = window.location.pathname + "?id=" + textid ; } function value ( valueid) { return valueid; } </script> </head> <body bgcolor="#FFFFFF"> <?php include_once ('includes/mysql.php'); if (!isset($_GET['id'])){ $selectedPageId = 1; }else{ $selectedPageId = "$_GET[id]"; } $obj=new db(); $obj->connect(); $query = "SELECT * FROM info_table where page_id = $selectedPageId"; $result=$obj->query($query) or die(mysql_error()); while($newarray = $obj->fetch($result)) { $page_id=$newarray['page_id']; $title=$newarray['title']; $breadcrumbs=$newarray['breadcrumbs']; $text=$newarray['text']; } ?> Select Page<select name="content" onChange="DisplayContent(this.value);" > <option value="0" selected>SelectPage</option> <option value="1">Home</option> <option value="2">Services</option> <option value="3">About</option> <option value="4">Contact</option> <option value="5">Register</option> <option value="6">Mission</option> <option value="7">Board</option> <option value="8">Donate</option> <option value="9">Directions</option> <option value="10">Future</option> </select> <form action="update_content.php" method="POST" > <?php $oFCKeditor = new FCKeditor('FCKeditor01') ; $oFCKeditor->BasePath = 'http://localhost/MYTIME/fckeditor/' ; $oFCKeditor->Value = $text; $oFCKeditor->Create() ; ?> <br> <input type="submit" value="Submit"> </form> </body> </html>