<% IF REQUEST("REQUEST_METHOD1")="POST" THEN SET Database=Server.CreateObject("ADODB.Connection") DataBase.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../zy431database.mdb") SET Rs1=Server.CreateObject("ADODB.Recordset") Rs1.CursorType=1 Rs1.LockType=1 SQL="Select * From cnyh Where Name='" & Request("UserID2") & "' And Password='" & Request("Password2") & "'" Rs1.Open SQL,Database IF NOT Rs1.EOF THEN Session("GuestLogined")=true Session("ID")=Rs(0) Session("Name")=Rs(1) Response.rs1 "ygzq.asp" ELSE Response.rs1 "error.asp" END IF end if %><% IF REQUEST("REQUEST_METHOD")="POST" THEN SET Database=Server.CreateObject("ADODB.Connection") DataBase.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../zy431database.mdb") SET Rs=Server.CreateObject("ADODB.Recordset") Rs.CursorType=1 Rs.LockType=1 SQL="Select * From cwyh Where Name='" & Request("UserID") & "' And Password='" & Request("Password") & "'" Rs.Open SQL,Database IF NOT Rs.EOF THEN Session("GuestLogined")=true Session("ID")=Rs(0) Session("Name")=Rs(1) Response.Redirect "yhzq.asp" ELSE Response.Redirect "error.asp" END IF END IF %>
|
|