2016-04-25 17 views
-1

view.phpページで私の投稿の説明を表示できません。代わりに、エコーのview.phpページに自分の投稿を表示する方法

var_dump($row) 

:変数$列がnullでなく、で、あなたのフィールドが含まれている場合

<?php include("config.php"); ?> 
 
<?php 
 
ob_start(); 
 
session_start(); 
 
if($_SESSION['name']!='admin'){ 
 
    header('location: admin_login.php'); 
 
} 
 

 
?> 
 
<?php 
 
if(isset($_GET['id'])) 
 
$id=$_GET['id']; 
 
print_r($id); die; 
 
?> 
 

 
<!DOCTYPE html> 
 
<html> 
 
    <head> 
 
    <meta charset="utf-8"> 
 
     <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
 
     <meta name="viewport" content="width=device-width, initial-scale=1"> 
 
    <title>view post2</title> 
 
    <link href="admincss/bootstrap.min.css" rel="stylesheet"> 
 
    <link rel="stylesheet" type="text/css" href="admincss/admincustom.css"> 
 
    </head> 
 
    <body> 
 
    <div class="full_page"> 
 
    <div class="iner_page"> 
 
     <h2><span style="">View all data</span></h2> 
 
     <form action="" method="post"> 
 
       <table class="tbl3"> 
 
       <tr> 
 
       <?php 
 
       $postid=$_GET['post_id']; 
 
       
 
       $result=(mysql_query("SELECT * from `tbl-post`(post_id) VALUES `$postid`")); 
 
       while ($row=mysql_fetch_row($result)){ 
 

 
       } 
 

 
       
 
       ?> 
 
        <tr> 
 
        <td><b><span style="color:#000;">Title</span></b></td> 
 
        </tr> 
 
        <tr> 
 
         <td> 
 
         <span id="view_post_title" style="font-weight: bold; font-size:18px;color:red;"><?php echo $row['post_title']; ?></span> 
 
         </td> 
 
        </tr> 
 
        <tr> 
 
         <td> 
 
         <img id="view_post_image" class="img-thumbnail" width="304" height="236" src="uplodfile/<?php echo $row['post_image']; ?>"> 
 
         </td> 
 
        </tr> 
 
        <tr><td><span style="font-weight: normal; font-size:16px;color:red;">Featchered Images</span></td></tr> 
 
        <tr> 
 
         <td><span style="font-weight: bold; font-size:22px;color:#000; ">Description</span></td> 
 
        </tr> 
 
        <tr> 
 
         <td><span id="view_post_description" style="font-weight:normal; font-size:16px;font-size:19px;"> 
 
          <?php echo $row['post_description']; ?> 
 

 
         </span></td> 
 
        </tr> 
 
        <tr> 
 
         <td><span style="font-weight: normal; font-size:22px; color:#000;">Catagory</span></td> 
 
        </tr> 
 
        <tr> 
 
         <td> 
 
         <span id="view_post_catname" style="font-weight: bold; font-size:18px;color:red;"> 
 
          vkssc hvkuv futyoi ylg 
 
         </span> 
 
         </td> 
 
        </tr> 
 
        <tr> 
 
         <td><span style="font-weight: normal; font-size:18px; color:#000;">Tag</span></td> 
 
        </tr> 
 
        <tr> 
 
         <td><span id="view_post_tag" style="font-weight: bold; font-size:18px;color:red;"> 
 
         huysrg ulier biurhq9r 
 
         </span></td> 
 
        </tr> 
 
       </tr> 
 
       
 
       </table> 
 
      </form> 
 
    </div> 
 
    <a href="View-Post .php"><button name="" type="button" class="btn btn-default new_view_button" data-dismiss="modal" href="">Close</button></a> 
 
    </div> 
 
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> 
 
     <script src="js/jquery-1.11.3.min.js"></script> 
 
     <script src="js/bootstrap.min.js"></script> 
 
    </body> 
 
</html> 
 

 

 
      
 

+0

「あなたは試してみましたが、失敗しました」と言ってください。具体的にあなたが試したことと、その試行結果が何だったのかを詳しく説明します。 – CodeMouse92

+0

わかりやすい構文エラーです。 –

答えて

-1

チェックを次のように

私のコードです。

関連する問題