菏泽曹县特殊服务:怎么才能完成这个认证功能?

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/28 03:41:45
<!--#include file="conn.asp"-->
<%
yonghuming=request("yonghuming")
password=request("password")
repassword=request("repassword")
xinxiang=request("xinxiang")

if trim(yonghuming)&"x"="x"or trim(password)&"x"="x"then
response.write" <script>alert('不能为空')</script> "
else
if password<>repassword then
response.write "<script>alert('密码要一样') </script>"

else

set rs=server.createobject("adodb.recordset")
sql="select * from yonghu where yonghuming='"&yonghuming&"'"
rs.open sql,conn,1,3
if rs.eof then
rs.addnew
rs("yonghuming")=yonghuming
rs("password")=password
rs("repassword")=repassword
rs("xinxiang")=xinxiang
rs.update

rs.close
set rs=nothing
response.write("成功")

else
response.Write("不能重名")
end if
end if
end if

%>
在这个程序中怎么才能实现可以检测到xinxiang中是不是含有"@"并且提示

if instr(xinxiang,"@")>0 then
response.write "xinxiang中含有@"
end if