如何在提交表单到数据库的同时增加发一份邮件通知到我的邮箱或QQ的功能?希望高手能在原码上帮忙修改!谢谢,
这是表单提交后的保存文件代码:<!--#includefile="Start.asp"--><%Dimclpp,clsl,czxm,Mail,Tel,Content,ad...
这是表单提交后的保存文件代码:
<!--#include file="Start.asp"-->
<%
Dim clpp, clsl, czxm, Mail, Tel, Content, adress, exec
clpp=request.form("clpp")
clsl=request.form("clsl")
czxm=request.form("czxm")
Mail = request.Form("Mail")
Tel=request.form("Tel")
adress=request.form("adress")
Content=request.form("Content")
LastLoginTime=request.form("LastLoginTime")
If len(clpp) < 2 Then
response.write "<script>alert(""请输入型号!"");history.back(-1);</script>"
End If
If len(clsl) < 2 Then
response.write "<script>alert(""请输入数量!"");history.back(-1);</script>"
End If
If len(czxm) < 2 Then
response.write "<script>alert(""请输入姓名!"");history.back(-1);</script>"
End If
If len(Tel) < 8 Then
response.write "<script>alert(""请正确输入电话号码!"");history.back(-1);</script>"
End If
If len(adress) < 2 Then
response.write "<script>alert(""请输入联系地址!"");history.back(-1);</script>"
End If
exec="insert into PE_zxbm(clpp,clsl,czxm,Tel,Mail,adress,Content)values('"+clpp+"','"+clsl+"','"+czxm+"','"+Tel+"','"+Mail+"','"+adress+"','"+Content+"')"
conn.execute exec
conn.close
set conn=nothing
response.write "<script>alert(""保存成功!"");location.replace('index.html');</script>"
%> 展开
<!--#include file="Start.asp"-->
<%
Dim clpp, clsl, czxm, Mail, Tel, Content, adress, exec
clpp=request.form("clpp")
clsl=request.form("clsl")
czxm=request.form("czxm")
Mail = request.Form("Mail")
Tel=request.form("Tel")
adress=request.form("adress")
Content=request.form("Content")
LastLoginTime=request.form("LastLoginTime")
If len(clpp) < 2 Then
response.write "<script>alert(""请输入型号!"");history.back(-1);</script>"
End If
If len(clsl) < 2 Then
response.write "<script>alert(""请输入数量!"");history.back(-1);</script>"
End If
If len(czxm) < 2 Then
response.write "<script>alert(""请输入姓名!"");history.back(-1);</script>"
End If
If len(Tel) < 8 Then
response.write "<script>alert(""请正确输入电话号码!"");history.back(-1);</script>"
End If
If len(adress) < 2 Then
response.write "<script>alert(""请输入联系地址!"");history.back(-1);</script>"
End If
exec="insert into PE_zxbm(clpp,clsl,czxm,Tel,Mail,adress,Content)values('"+clpp+"','"+clsl+"','"+czxm+"','"+Tel+"','"+Mail+"','"+adress+"','"+Content+"')"
conn.execute exec
conn.close
set conn=nothing
response.write "<script>alert(""保存成功!"");location.replace('index.html');</script>"
%> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询