菜鸟请教大虾一个问题,谢谢了

bigpandar 2005-04-03 03:10:03
我现在要做一个登陆验证页,其中以学号为用户名,生日为其初始密码,数据库表名为xsda(内有学号XH与身份证SFZ字段)学号为字符型6位,代码如下(好像有点问题)

<%
Option Explicit
dim rs
dim sql
dim xh,sfz

xh=left(request("user_name"),6)
sfz=left(request("password"),6)

if password="" or xh="" then
response.redirect "error.asp"
end if%>
<!--#include file="conn.asp"-->
<%Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from xsda where xh like '" & xh & "'and sfz like '" & sfz & "'"
rs.open sql,conn,3,2

if rs.eof and rs.bof then
response.redirect "error.asp"
else response.redirect "search.asp?xh=rs("xh")"
end if%>


有两个问题,一是如何分类提取15位和18位身份证号的出生年月,二是代码怎么写比较好,谢谢
...全文
52 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧