Eivo Posted May 3, 2007 Share Posted May 3, 2007 I am working on a few pages to form a log in system. I have my form ask for the user name and password then they hit submit. The next page I have takes the user name a looks for it in my MsSQL database. If it finds it then it compares the user name and password to see if they are correct. I have this all working well and good. But I didn't think about what would happen if the database couldn't find the user name. So now every time someone logs in under a wrong user name they get an ugly error. My question is how would I handle that error to make it a "Incorrect User Name" page?EDIT: I am using ASP classic, not dotNET. Link to comment Share on other sites More sharing options...
pulpfiction Posted May 3, 2007 Share Posted May 3, 2007 You must be using a IF statement to see if the SQL Query returns any record. add an else statement and redirect user to login error page or login page...It will be something like this. If (sql condition) thenresponse.redirect "next page.asp"elseresponse.redirect "login_error.asp"end if Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.