2014-09-02 52 views
0

我想讓我的文本編輯器完全起作用,就像我想通過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(); 
     } 
    } 
} 
?> 
+0

人們會更傾向於幫助你,如果你不屑發佈之前,使用預覽... – 2014-09-02 08:52:48

回答

0

您可以使用richtext編輯器並將上傳文件集成到遠程服務器功能中。

例如集成的CKEditor & CKFinder或者Tinymce版本

+0

感謝您的回答#Farshad – user3774870 2014-09-02 12:23:09

+0

不客氣@ user3774870 – Farshad 2014-09-02 12:30:41