我想让我的文本编辑器完全正常运行,就像我希望通过CMS天气放置我的图像,我想要在段落之后或任何我想要的地方。
<?php
include('includes/db.php');
if (isset($_POST['submit']))
{
$post_title = $_POST['title'];
$post_date = date('d-m-y');
$post_author = $_POST['author'];
$post_keywords = $_POST['keywords'];
$post_content = $_POST['content'];
$post_book = $_FILES['image']['name'];
$tmp_image = $_FILES['image']['tmp_name'];
if ($post_title == '' || $post_author == '' || $post_keywords == '' || $post_content == '') {
echo "<script>alert('Anyone field is empty')</script>";
exit();
} else {
move_uploaded_file($tmp_image, "../e-books/$post_book");
$insert_query = "insert into post (p_title,p_date,p_author,p_image,p_keywords,p_content) values ('$post_title','$post_date','$post_author','$post_book','$post_keywords','$post_content')";
if (mysql_query($insert_query)) {
echo "<script>window.open('insert_post.php?posted=Post is going to be published....!!!','_self')</script>";
exit();
}
}
}
?>