i want to update mysql by using a wysiwyg inside a form i put a wysiwyg in my page inside a form and defined it's id="editor" like this:
<form Method="post" action="post.php">
<input type="text" name="title" />
<div id="editor"></div>
<input type="submit" name="update" value="update">
</form>
and in post.php file:
<?php
if (isset($_POST['update'])){
$title=$_POST['title'];
$body=$_POST['editor'];
mysql_connect("x", "y","z")or die (mysql_error());
mysql_select_db('t')or die (mysql_error());
mysql_query("UPDATE news SET title='$title', body='$body' WHERE `id`='$_GET[update]'");
mysql_close();
header("location:new_page.php");
?>
the proplem is the first input updated in mysql but $body doesn't have the sam value of wysiwyg or it doesn't update in mysql ?? and also the wysiwyg editor recomended a div to write inside an edit