<?php session_start(); ?><!DOCTYPE html>
<html><head>
<meta charset="UTF-8">
<title>搜尋結果清單</title>
</head><body>
<?php  //下拉式選單
include("server1.php");	
if(!isset($_POST['search1']))
  die("無法搜尋");
$search1=$_POST['search1'];
$years=$_SESSION['years'];                    
?> 
搜尋<?php echo $years."年"; ?>文件裡
的關鍵字結果如下：<?php echo $search1;?>
<?php 
 $param = "%{$search1}%"; 
 if ($stmt = $mysqli2->prepare("select meetingid,num,docutitle"
         . " from document  where search1 like  ?  " )) {
  $stmt->bind_param("s", $param);
  $stmt->execute();
  $stmt->bind_result($col1,$col2,$col3);   
  $stmt->store_result();
 if($stmt->num_rows<1)
  die('<table><tr><td  colspan="2">==沒有資料==</td></tr></table>');
 else
  echo "<table><tr><td>期數</td><td>連結</td></tr>";
 while ($stmt->fetch())
  {    ?>						
    <tr><td><?php  echo $col2; ?></td><td>
    <a href="report_show.php?meetingid=<?php  echo $col1; ?>&num=
        <?php  echo $col2; ?>"  target="_blank"><?php echo $col3?></a>
    </td></tr><?php 
  } ?></table><?php 
  $stmt->close();	  
 }
 $mysqli2->close();
?></body></html>