这是代码
<?php
echo "<table border='1' bordercolor='#F0000' cellspacing='0' align='center'><tr><td>"; //输出表格
echo "<h2 style='color:#oo33ff'>闹钟程序</h2>"; //输出标题
date_default_timezone_get("Asia/ShangHai"); //设置时区
echo "<h6 style='color:red'>今天是".date("Y-m-d H:i:s")."<H6>"; //输出当前时间
echo "<form action='' method='post'>";
echo "<input type='text' name='text' size'2'>年<input type'text' name='text2' size='2'>月";
echo "<input type='text' name='text3' size'2'>日<br><input type'text' name='text4' size='2'>时";
echo "<input type='text' name='text5' size'2'>分<input type'text' name='text6' size='2'>秒";
echo "<br /><input type='submit' name='sub' value='定时'>";
echo "</form>";
$a=$_POST['text1'];
$b=$_POST['text2'];
$c=$_POST['text3'];
$d=$_POST['text4'];
$e=$_POST['text5'];
$f=$_POST['text6'];
$time = date(mktime($a,$b,$c,$d,$e,$f));
$_SESSION['time']=$time;
if($_POST[sub]){
echo "<script>window.location.href='';</script>";
}
echo "</td></tr></table>";
?>
仙士可