Asp 单页查询数据库!

作者:袖梨 2022-06-30
 

<%
dim rs,sql,x_name,x_pwd,x_count
If Request.Form("do")="ok" Then
If Request.Form("user_name")="" Then
Response.Write("")
Response.End()
Else
x_name = Request.Form("user_name")
End If
'↑ 叛断用户名是否为空!
If Request.Form("user_pwd")="" Then
Response.Write("")
Response.End()
Else
x_pwd = Request.Form("user_pwd")
End If
'↑ 叛断用户密码是否为空!
set rs = Server.Createobject("adodb.recordset")
sql="select * from [user] where user_name='"&x_name&"' and user_pwd='"&x_pwd&"'"
rs.open sql,conn,1,1
if not rs.Eof Then
session("s_name")=rs("user_name")
session("s_shen")=rs("shenfen")
session("s_shi")=rs("shijian")
Response.Redirect "infoin.asp"
Else
Response.Write("")
Response.End()
End If
Else
%>
-->系统登录

 


 


   


 

   
   
 
 
     
    
    

相关文章

精彩推荐

一聚教程网

Copyright © 2010-2022

111cn.net All Rights Reserved

-->系统登录