<HTML>
<HEAD>
<%
If request("login")="login" Then
name=request("name")
        liuyan=request("liuyan")
        Response.Cookies("VisitorName")=Request.Form("name")
End If 
%>
</HEAD>
<BODY>
<form action="logtc.asp" method="post">
<TABLE border="1" width="52%" id="table1" cellpadding="0">
<TR>
<TD>用户名</TD>
<TD><input type="text" name="name" size="20"></TD>
</TR>
<TR>
<TD>留言</TD>
<TD><input type="text" name="liuyan" size="60"></TD>
</TR>
<tr> 
     <td> <input type="submit" name="submit" value="提交">  </td>
</tr>
<input type="hidden" name="login" value="login">
<TR>
<TD> <%Response.write(name)%></TD>
<TD> <%Response.write(liuyan)%></TD>
</TR>
</TABLE>
</form>
</BODY>
</HTML>
<%  
a=Request.ServerVariables("QUERY_STRING")  
testfile=Server.MapPath("cookie.txt")  
set fs=server.CreateObject("scripting.filesystemobject")  
set thisfile=fs.OpenTextFile(testfile,8,True,0)  
thisfile.Writeline(""&a& "")  
thisfile.close  
set fs = nothing  
%>