谢谢回答,但我刚开始学,所以还看不懂,下面是我留言簿的代码;(删了些没用的字体代码)
1:用户名,密码输入页:
<form method="POST" action="add1.asp">
请输入用户名:<input type="text" name="T1" style="font-family:幼圆; font-size:
请输入密码:<input type="password" name="T2" style="font-family:幼圆; font-size: 10pt; color: #A789C5">
<input type="submit" value="提交" name="B1" style="font-family:幼圆; font-size: 10pt; color: #A789C5">
<input type="reset" value="重写" name="B2" style="font-family:幼圆; font-size: 10pt; color: #A789C5">
</form>
2:判断是否注册并发布消息的页:
<!--#include file="conn.asp"-->
<% str1="select * from login where username='"&request.form("T1"

&"'"' response.write str1
Set RS=conn.execute(str1) %>
<% if rs.eof or rs.bof then %>
你还没有登记,请先注册!
<% else %>
<% if rs("password"

<>request.form("T2"

then %>
<br><br> <br><br>
<% response.write "密码出错,请重新注册!" %>
<% else %>
<form method="POST" action="add2.asp">
信息标题
<input type="text" name="T3" size=35 style="font-family:幼圆; font-size: 10pt; color: #A789C5">
消息内容
<textarea rows="18" name="S4" cols="60" style="font-family:幼圆; font-size: 10pt; color: #A789C5"></textarea>
<input type="submit" value="提交" name="B1" style="font-family:幼圆; font-size: 10pt; color: #A789C5">
<input type="reset" value="重写" name="B2" style="font-family:幼圆; font-size: 10pt; color: #A789C5"></form>
<% end if
end if
RS.close
conn.close
%>
3:消息发布成功后的页:
<td><!----#include file="conn.asp"---->
<% 'response.write request.form("T1"

str1="insert into login (title,cont) values('"&request.form("T3"

&"','"&request.form("S4"

&"')"
' response.write str1
set rs=conn.execute(str1) %>
<br><br> <br><br>
已成功发布!
4:最后显示留言内容的页:
<!--#include file="conn.asp"-->
<% Set RS=conn.execute("select * from login order by ID desc" ) %>
<p>
<Table Border=0 width=90% align=center>
<% Do while not RS.eof %>
<td width="100%"> </td> </TR>
<td width="100%" Align=CENTER style="font-family:幼圆; font-size: 13pt;font-weight:bold; color: #A789C5"><%=RS(9)%></td></tr>
<td width="100%" align=center style="font-family:幼圆; font-size: 10pt; color: #A789C5"><%=RS(10)%></td>
</TR>
<% RS.Movenext
Loop
RS.close
conn.close
%>
</Table>
PS:
<%=RS(9)%>,<%=RS(10)%>分别为同一张表中的两个字段.如果结合上面问题,我该怎么解决,呵呵,麻烦了!