PHPで検索ページを作っていました。しかし、それは誤りです。私のエラーを教えてください。
エラーは次のとおりです。
注意: 未定義の変数: I:\xampp\htdocs\tsooj\includes\search_page.php の 22 行目の post_title
注意: 未定義の変数: 26 行目の I:\xampp\htdocs\tsooj\includes\search_page.php の post_content
ソースコードはこちら:
<div id="content-main">
    <?php
    include("includes/connect.php");
    
    if(isset($_GET['search'])){
    
    $search_id = $_GET['value'];
    
    $search_query = "select * from posts where post_keywords like '%$search_id%'";
    
    $run_query = mysql_query($search_query);
    
    while ($search_row = mysql_fetch_array($run_query)){
    
    $post_title = $search_row['post_title'];
    $post_image = $search_row['post_image'];
    $post_content = substr($search_row['post_content'],0,150);
    }
    ?>
<h1>Your Search Result is here:<h1>
<h2><?php echo $post_title; ?></h2>
<img src="images/<?php echo $post_image; ?>">;
<p><?php echo $post_content; ?></p>
<?php } ?>
    
</div>