先來看看guest.php的內容,你當然可以直接將下面的內容放到您的PHP網頁裡,請尊重作者的勞動,謝謝.
----------------------
//guest.
<?PHP
require("sys.PHP");
if ($B1)
{
if ($message=="" or $name=="")
{
$errorm="<font color=red>出錯了!!!</font>姓名和留言內容必填";
}
else
{
#寫入數據
$space = " ";
$time = date(Y年m月d日H小時i分);
$ip=$REMOTE_ADDR;
$name=encode($name);
$homepage=encode($homepage);
$from=encode($from);
$email=encode($email);
$message=StripSlashes($message);
$message=Htmlspecialchars($message);
$message=check_strlen_long($message);
$message=nl2br($message);
$guestcontent = "<tr><td><font color=#AB00E1>留言內容:</font><br><!--content>$message<!--endcontent> ";
$guestcontent=$guestcontent."<br><font color=#6633FF>留言人大名:</font><!--name>$name<!--endname> ";
if ($email !="")
{$guestcontent=$guestcontent."<br><font color=#9900CC>電子信箱</font><a href=\"mailto:$email\"><!--email>$email<!--endemail></a>"."$space";}
if ($homepage !="http://")
{$guestcontent=$guestcontent."<font color=#9900CC>主頁:</font>$hompage<a href=\"$homepage\"><!--homepage>$homepage<!--endhomepage></a>";}
$guestcontent=$guestcontent."<br><font color=#0000FF>