Linux 版 (精华区)
发信人: netiscpu (网中鸟~~可以飞了), 信区: Linux
标 题: 最简单的留言本
发信站: 哈工大紫丁香 (Fri Jul 9 07:33:20 1999), 转信
<?
$title = "Message Board Main Entry";
$page = "post";
$date = date( "Y-m-d H:i:s");
include "include/header.inc";
if($name){
if($ret = mysql_query( "insert into messageboard values ('$name','$emai
l','$subject','$date','$section','$thread','$content')")){ $response_mes
sage = "You have successfully posted your message."; }else {
echo ( "Unable to insert into dababase");
}
}
?>
<html><head><title> <?echo $title?></title></head>
<body bgcolor="whitesmoke">
<? if ($response_message){
echo $response_message;
echo "<h3>Here are the messages you have just posted:</h3>";
echo "name:<B>$name</B> <BR>";
echo "email:<B>$email</B> <BR>";
echo "subject:<B>$subject</B> <br>";
echo "content:<blockquote>$content</blockquote> <BR>";
}
?>
<h2>MESSAGE BOARD</h2>
<? echo $date ?>
<form name=messageform action=" <?echo $PHP_SELF?>" method=post>
Name: <input name=name value="Your Name Here" size=12><br>
Email: <input name=email value="Your Email @ Your Site " size=20><br>
Subject: <input name=subject value="How to leave a message?" size=40><b
r> Content: <textarea name=content cols=60 rows=6></textarea>
<input type=submit>
</form>
<a href="messageboard.phps">View Source</a>
<?include "include/footer.inc"?>
--
☆ 来源:.哈工大紫丁香 bbs.hit.edu.cn.[FROM: bin@mtlab.hit.edu.cn]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.579毫秒