%@ LANGUAGE="VBSCRIPT" %> <% if Session("ClientID") <> 0 then response.redirect "client-index.asp" end if %> <% UserName = Trim(Request.Form("UserName")) UserPassword = Trim(Request.Form("UserPassword")) ret = request.querystring("ret") if UserName <> "" and UserPassword <> "" then ' check if login is correct strSQL = "select * from Clients where UserName='" & UserName & "' and UserPassword='" & UserPassword & "'" rs.Open strSQL, conn if not rs.EOF then Session("ClientID") = rs("ID") rs.close conn.close if ret <> "" then response.redirect(ret) else response.redirect("client-index.asp") end if end if msg = "User name / password invalid" rs.close end if %>