asp 表单提交出错
把旧网站的asp文件放到新网站目录下调用出错!html网页代码:尊敬的客户,如果您想购买我们的产品又不知选择时,请详细填写您的需求,我公司销售人员在收到您的信息后,将会及...
把旧网站的asp文件放到新网站目录下调用出错!
html网页代码:
尊敬的客户,如果您想购买我们的产品又不知选择时,请详细填写您的需求,我公司销售人员在收到您的信息后,将会及时与您联系并为您选择最适合您用的产品。(<FONT
color=#0000ff>* </FONT>为必填项) </span>
<FORM action="sqlstrnet.asp" method=post>
<TABLE class=formborder cellSpacing=3 cellPadding=2 width=533
align=center bgColor=#F1EFF0 border=0>
<TBODY>
<TR>
<TD width=160 align=right class="style13">您公司的全称:</TD>
</TR>
<TR>
height=69><INPUT type=image height=20 width=63 src="images/abouts/2_button_reset.gif" border=0 name=reset>
<INPUT type=image height=20
width=63 src="images/abouts/2_button_tijiao.gif"
name=Submit>
</TD>
</TR>
asp里代码:
<% response.Buffer=true %>
<!--#include file="opendb.asp"-->
<%
set conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")
companyname=request.Form("companyname")
companyaddress=request.Form("companyaddress")
mainname=request.Form("mainname")
phone=request.Form("phone")
email=request.Form("email")
code=request.Form("code")
product=request.Form("product")
remark=request.Form("remark")
dim sql,sValues
sql="insert into netorder(companyname"
sValues="Values('" & companyname & "'"
sql=sql & ",companyaddress"
sValues=sValues & ",'" & companyaddress & "'"
if mainname <> "" then
sql=sql & ",mainname"
sValues=sValues & ",'" & mainname & "'"
end if
if phone <> "" then
sql=sql & ",phone"
sValues=sValues & ",'" & phone & "'"
end if
if email <> "" then
sql=sql & ",email"
sValues=sValues & ",'" & email & "'"
end if
if code <> "" then
sql=sql & ",code"
sValues=sValues & ",'" & code & "'"
end if
if product <> "" then
sql=sql & ",product"
sValues=sValues & ",'" & product & "'"
end if
if remark <> "" then
sql=sql & ",remark"
sValues=sValues & ",'" & remark & "'"
end if
sql=sql & " ) " & sValues & " ) "
rs.open sql,conn,1
response.Redirect "thanks.htm"
%> 展开
html网页代码:
尊敬的客户,如果您想购买我们的产品又不知选择时,请详细填写您的需求,我公司销售人员在收到您的信息后,将会及时与您联系并为您选择最适合您用的产品。(<FONT
color=#0000ff>* </FONT>为必填项) </span>
<FORM action="sqlstrnet.asp" method=post>
<TABLE class=formborder cellSpacing=3 cellPadding=2 width=533
align=center bgColor=#F1EFF0 border=0>
<TBODY>
<TR>
<TD width=160 align=right class="style13">您公司的全称:</TD>
</TR>
<TR>
height=69><INPUT type=image height=20 width=63 src="images/abouts/2_button_reset.gif" border=0 name=reset>
<INPUT type=image height=20
width=63 src="images/abouts/2_button_tijiao.gif"
name=Submit>
</TD>
</TR>
asp里代码:
<% response.Buffer=true %>
<!--#include file="opendb.asp"-->
<%
set conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")
companyname=request.Form("companyname")
companyaddress=request.Form("companyaddress")
mainname=request.Form("mainname")
phone=request.Form("phone")
email=request.Form("email")
code=request.Form("code")
product=request.Form("product")
remark=request.Form("remark")
dim sql,sValues
sql="insert into netorder(companyname"
sValues="Values('" & companyname & "'"
sql=sql & ",companyaddress"
sValues=sValues & ",'" & companyaddress & "'"
if mainname <> "" then
sql=sql & ",mainname"
sValues=sValues & ",'" & mainname & "'"
end if
if phone <> "" then
sql=sql & ",phone"
sValues=sValues & ",'" & phone & "'"
end if
if email <> "" then
sql=sql & ",email"
sValues=sValues & ",'" & email & "'"
end if
if code <> "" then
sql=sql & ",code"
sValues=sValues & ",'" & code & "'"
end if
if product <> "" then
sql=sql & ",product"
sValues=sValues & ",'" & product & "'"
end if
if remark <> "" then
sql=sql & ",remark"
sValues=sValues & ",'" & remark & "'"
end if
sql=sql & " ) " & sValues & " ) "
rs.open sql,conn,1
response.Redirect "thanks.htm"
%> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询