解决检验手机号码已存在的问题!望朋友帮个忙
<%response.buffer="true"
If request.form("user")="" Then
response.write"<script>alert('请填写联系人姓名!');history.back()</script>"
response.end
End If
If request.form("tel")="" Then
response.write"<script>alert('请填写您联系电话!');history.back()</script>"
response.end
End If
if len(trim(request.form("tel")))<11 then
response.write"<script>alert('你的手机号码不够11位请重新填写!');history.back()</script>"
response.end
End If
%>
<!--#include file="CONN.ASP" -->
<%
dim rs,sql
set rs=server.createobject("adodb.recordset")
sql="select * from cdb where (id is null)"
rs.open sql,conn,1,3
rs.addnew
rs("user")=request.form("user")
rs("tel")=request.form("tel")
rs("dt")=now()
rs("productID")=request.form("productID")
rs("ip")=request.ServerVariables("remote_addr")
rs("url")=Request.ServerVariables("HTTP_REFERER")
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
在此代码的基础上添加“检验号码已存在的功能”