 <?php
 include("server1.php"); 
 $stmt = $mysqli2->prepare("INSERT INTO "
  . "document(pdfname,years,num,search1,docutitle) VALUES (?, ?, ?,?,?)");
 $stmt->bind_param('siiss',
 $_SESSION['uploadfile'], 
 $_SESSION['years'],
 $_SESSION['months'],
 $_SESSION['keywords'] ,
 $_SESSION['docutitle'] );
 if($stmt->execute())
  { ?>
   <script>
     alert('完成新增資料');
	 location.href="view.php";
   </script>
  <?php
  } 
  $stmt->close();  
 ?>