Username and Password Problem

06-21-2002, 08:07 PM
Hello everybody
I'm new to ASP. What i want to do is to check the "Username" and "password" with the database. My database and all the files are present in IIS server. I'm using oracle9i.
Please just give me the simple script to go about. I'll manage try and error method right now. It seems easy in VB. and i'm using vbscript. and in submit button i want to validate both.
Please help me
thanking you

06-22-2002, 08:05 AM
On your login page you would use something like....<FORM METHOD="Post" ACTION="checkpassword.asp">
<INPUT TYPE=Password NAME="txtPassword" MAXLENGTH=15>
</FORM>Then, on checkpassword.asp, you would use...
RS.Open _
"SELECT [UserName] " & _
"FROM Users " & _
"WHERE [UserName]='" & request("txtUserName") & "' " & _
"AND [Password]='" & request("txtPassword") & "'", adoCon, 3, 3, 1

if RS.Recordcount > 1 then
response.write "Password good"
response.write "Password bad"
end ifThis assumes, of course, that you have your recordset and connection objects created and initialized. A few things to consider:
1) You can check the username/password on the same page the login occurs by using something like ACTION=samepage.asp?method=check. Then, if errors occur you can display them right there.
2) This simple script does not really defend against an SQL Injection attack.

06-24-2002, 01:11 AM
Hi Rezner,
Thank you for your help. I have IIS server and database is oracle. so how can i do my connection string. Please tell me in generalised way what should be my connection string to connect to the database.

thanking you

06-25-2002, 03:24 AM
Hi robby
Please help me how can i set IIS on the connection strin. In general term tell me.
i don't want exact code
thank you

06-25-2002, 04:35 PM
here's a list

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum