hycxxt=trim(request("hycxxt"))
if hycxxt<>"" then
if len(hycxxt)<8 then
mess="請正確輸入會員卡號!"
else
ishycxxt=1
if len(hycxxt)>8 then
for i=1 to 8
if instr("0123456789",cstr(mid(cstr(hycxxt),i,1)))<1 then
ishycxxt=0
end if
next
else
ishycxxt=0
end if
if ishycxxt=1 then
rs.open " select * from hyxx where hykh='"& hycxxt &"'",conn,1,1
if rs.bof or rs.eof then
mess="沒有妳要查的會員信息!"
else
mier_hycxxt=hycxxt
mier_hyxm=rs("hyxm")
mier_hyjf=rs("hyjf")
mier_hyjb=rs("kmc")
end if
rs.close
else
if right(hycxxt,1)="省" or right(hycxxt,1)="市" or right(hycxxt,1)="縣" or right(hycxxt,1)="區" then
hycxxt=left(hycxxt,len(hycxxt)-1)
end if
rs.open " select * from hyxx where PROVINCE = '"& hycxxt &"'",conn,1,1
if rs.bof or rs.eof then
rs.close
rs.open " select * from hyxx where hyxm = '"& hycxxt &"' ",conn,1,1
if rs.bof or rs.eof then
mess="沒有找到妳要查找的會員!"
else
mier_hycxxt=rs("hykh")
mier_hyxm=rs("hyxm")
mier_hyjf=rs("hyjf")
mier_hyjb=rs("kmc")
end if
rs.close
else
do
if rs.bof or rs.eof then
exit do
else
if hycxxt<>rs("PROVINCE") then
exit do
end if
mier_hyxm=mier_hyxm&rs("hyxm")&" "&rs("hykh")&"<br>"
rs.movenext
end if
loop
rs.close
end if
end if
end if
end if
%>