<?php
 if(!isset($_SESSION['meetingid']))
      die("無法更新資料");
 include("server1.php");
 echo $_SESSION['year']."<br>";
  echo   $_SESSION['num']."<br>";
  echo   $_SESSION['search1']."<br>";
  echo   $_SESSION['uploadfile']."<br>";
  echo   $_SESSION['docutitle']."<br>";
  echo   $_SESSION['meetingid']."<br>";
 $stmt = $mysqli2->prepare("UPDATE document SET years = ?, 
  num = ?, 
  search1 = ?,
  pdfname= ?,
  docutitle=?
  WHERE meetingid = ?");
 $stmt->bind_param('iisssi',
   $_SESSION['year'],
   $_SESSION['num'],
   $_SESSION['search1'],
   $_SESSION['uploadfile'],
   $_SESSION['docutitle'],
   $_SESSION['meetingid']
  );
 if($stmt->execute())
  { ?>
   <script>
     alert('完成更新資料');
	 location.href="view.php";
   </script>
  <?php
  } 
  $stmt->close(); 
  ?>	

