为何数据提交不了?
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/conn.asp" -->
<%
' *** Logout the current user.
MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1"
If (CStr(Request("MM_Logoutnow")) = "1") Then
Session.Contents.Remove("MM_Username")
Session.Contents.Remove("MM_UserAuthorization")
MM_logoutRedirectPage = "login.asp"
' redirect with URL parameters (remove the "MM_Logoutnow" query param).
if (MM_logoutRedirectPage = "") Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL"))
If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_newQS = "?"
For Each Item In Request.QueryString
If (Item <> "MM_Logoutnow") Then
If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&"
MM_newQS = MM_newQS & Item & "=" & Server.URLencode(Request.QueryString(Item))
End If
Next
if (Len(MM_newQS) > 1) Then MM_logoutRedirectPage = MM_logoutRedirectPage & MM_newQS
End If
Response.Redirect(MM_logoutRedirectPage)
End If
%>
<a href="add_wen.asp">添加文章</a> <a href="del_wen.asp">删除文章</a> <a href="<%= MM_Logout %>">退出登陆</a>
<%
if request("title") <> empty and request("s1") <> empty then
Set myconn = Server.CreateObject("adodb.connection")
myconn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("../../db/netbar.asp")
title2 = replace(replace(trim(Request("title")),vbcrlf,"<br>")," "," ")
r12 = request("r1")
s12 = replace(replace(trim(Request("s1")),vbcrlf,"<br>")," "," ")
s22 = replace(replace(trim(Request("s2")),vbcrlf,"<br>")," "," ")
if s22 = empty then
s22 = " "
end if
mysql = "insert into wen (类别,标题,说明,内容,添加时间) values ('"&r12&"','"&title2&"','"&s22&"','"&s12&"','"&now()&"')"
'response.write mysql
myconn.execute mysql
response.write "<a href = 'add_wen.asp'>添加成功,返回</a>"
else
%>
<div align="center">
<center>
<form action = "add_wen.asp" name = "form" method = "post">
<table border="0" width="100%">
<tr>
<td width="14%">
<p align="center">标题:</p>
</td>
<td width="86%"><input type = "text" name = "title" size="55"></td>
</tr>
<tr>
<td width="14%">
<p align="center">类型:</p>
</td>
<td width="86%">
<p><input type="radio" value="动态" checked name="R1">网吧动态
<input type="radio" value="技术" name="R1">技术支持
<input type="radio" value="软件" name="R1">相关软件
<input type="radio" value="资费" name="R1">资费标准 <br>
<input type="radio" value="法律" name="R1">法律法规
<input type="radio" value="宝典" name="R1">网吧宝典
<input type="radio" value="公告" name="R1">公告
</p>
</td>
</tr>
<tr><td>说明:</td><td><p><textarea rows="8" name="S2" cols="54"></textarea></p></td></tr>
<tr>
<td width="14%">
<p align="center">内容:</p>
软件的内容为链接地址
</td>
<td width="86%">
<p><textarea rows="8" name="S1" cols="54"></textarea></p>
<p> </td>
</tr>
<tr>
<td width="14%"></td>
<td width="86%"><input type = submit> <input type = reset></td>
</tr>
</table> </form>
</center>
</div>
<%end if%>