标题: 判断老是出错怎么班 [打印本页] 作者: 風雲々無心メ 时间: 2010-1-19 04:15 标题: 判断老是出错怎么班 <%
if request("name")="" or request("tel")="" or request("city")="" or request("con")="" or request("qq")="" or request("mail")="" or request("address")="" then
response.write "不能为空"
elseif not isnumeric("tel") or not isnumeric("qq") or isnumeric("name") or isnumeric("city") then
response.write "电话,QQ号码只能为数字。姓名和城市不能为数字"
set rs= Server.CreateObject("adodb.recordset")
sql= "select * from guestbook"
rs.open sql,conn,1,3
rs.addnew
rs("name")=request("name")
rs("tel")=request("tel")
rs("city")=request("city")
rs("con")=request("con")
rs("qq")=request("qq")
rs("mail")=request("mail")
rs("address")=request("address")
rs.update
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "测试"
%>