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

