|
|||
|
Hey everyone.
Happy New Year to you's all. Hope you's had a grand one. ![]() Ive recently been studying ASP, well for a few months now. But ive came to a stand still. Its basically. login - if right advance to authorised page - if wrong go to unauthorised page. I've got everything working, except this login. The ASP page that checks the login against the database must be the problem, but i cant see any problems with it. My code is < % Dim adoCon Dim strCon Dim rsCheckUser Dim strAccessDB Dim strSQL Dim strUserName strUserName = Request.Form("Username") strAccessDB = "guestbook2" Set adoCon = Server.CreateObject("ADODB.Connection") strCon = "DRIVER={Microsoft Access Driver(*.mdb)};uid=;pwd=letmein; DBQ=" & Server.MapPath(strAccessDB) adoCon.Open strCon Set rsCheckUser = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT tblpass.Password FROM tblpass WHERE tblpass.Username ='"& strUserName &"'" rsCheckUser.Open strSQL, strCon If NOT rsCheckUser.EOF Then If (Request.Form("Password")) = rsCheckUser("Password") Then Session("blnlsUserGood")= True Set adoCon = Nothing Set strCon = Nothing Set rsCheckUser = Nothing Response.Redirect"authorised.asp?Username=" & strUserName End If End If Set adoCon = Nothing Set strCon = Nothing Set rsCheckUser = Nothing Session("blnlsUserGood")= False Response.Redirect"unauthoriseduser.html" % > Dont know if showing the code will do any good, but any help will be greatly appreciated ![]() thanx, kind regards gillyb x
__________________
![]() 'I love it we're soo thick and we're thrilled' |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
All times are GMT +1. The time now is 05:44.








Linear Mode

Algeria
Bangladesh
Ecuador
Morocco
Nepal
Nicaragua
Puerto Rico
South Africa
Ukraine
Virtual Countries