<table>
<tbody>
<tr>
<td align="right"><font size="2">名稱:</font></td>
<td><input maxLength="30" size="45" name="name" value="<?php echo $name;?>" size="2">
</tr>
<tr>
<td align="right"><font size="2">信箱:</font></td>
<td><input maxLength="50" size="45" name="email" value="<?php echo $email;?>" size="2">
</tr>
<tr>
<td align="right"><font size="2">內容:</font></td>
<td><textarea name="content" rows="9" wrap="true" cols="44" value="<?php echo $content;?>" size="800">輸入內容</textarea>
</tr><tr>
<form name="form1" method="post" action="mail.php">
<table width="300" border="0" cellspacing="0" cellpadding="3">
</tr>
<tr><td valign=middle >請輸入驗証碼:<font color=red>*</font></td>
<td bgcolor=$forumcolorone><input type=text maxLength=7 name=authnum size=20><img src=./authnum.php></td></td></tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><input name="action" type="hidden" id="action" value="confirm">
<input type="submit" name="Submit" value="確定">
----------------------------------------------------------------------------------------------
<?php
$mailto = "
123@hotmail.com"; //設定你的信箱位置
session_start();
if($_SESSION['result']!=md5($authnum)) {
session_destroy();
echo '驗証碼錯誤!'
}
If ($name != true || $email != true):
print "<script>alert('請輸入您的名稱、信箱!'); location.href= ('javascript:history.back();');</script>";Exit;
ElseIf(!Eregi(".+\@.+\\..+",$email)):
print "<script>alert('信箱格式不對!'); location.href= ('javascript:history.back();');</script>";Exit;
ElseIf($content != true):
print "<script>alert('內容要寫!'); location.href= ('javascript:history.back();');</script>";Exit;
EndIf;
<script language=\"JavaScript\">
alert(\"信件送出!\");
location.href= ('javascript:window.close();');
</script>";
$content = stripslashes($content);
$mailfrom = "From: $email";
$subject= "$title";
$body = "\n名稱: $name\n信箱: $email\n主題: $subject\n內容:\n-----------------------------------------------------------------------\n$content\n-----------------------------------------------------------------------\n";
mail ($mailto, $subject, $body, $mailfrom);
?>
----------------------------------------------------------------------------------------------------------------------------------不知道哪裡出錯了...請幫忙看一下^^"