برای ارسال مطلب در پایگاه داده این کد را نوشتم اما با هر بار refresh صفجه یک ردیف خالی در پایگاه داده ایجا د میشود لطفا راهنمایی کنید
[PHP] <?php
if(isset($_POST['text1']))
{
echo $_POST['text1'];
}
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("register", $con);
$editortext = $_POST['text1'];
mysql_query("INSERT INTO message (text1) VALUES('$editortext') ");
mysql_set_charset("utf8",$con);
mysql_close($con);
?>
<form action="sendmessage.php" method="post" name="posts">
<textarea name='text1' rows='2' id='text1' style='WIDTH:80px; HEIGHT:100%;'></textarea>
<script type='text/javascript'>
//<![CDATA[
// Replace the <textarea id='editor1'> with an CKEditor instance
var editor = CKEDITOR.replace( 'text1' );
//]]>
</script>
<input type="submit" name="send" value="ارسال" />
</form>
[/PHP]