線上書籍

Home

[982]PHP網站開發 進階應用技巧

<?php
session_start();
if($_SESSION['key']!=$_POST['key'] or empty($_SESSION['key'])){
    $_SESSION['content']=$_POST['content'];
    header("location:index.php");
}else{
    $_SESSION['content']=$_SESSION['key']="";
}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title></title>
  </head>
  <body>
 
    OK~您通過驗證囉!

  </body>
</html>