Ask a Question related to Dreamweaver AppDev, Design and Development.
-
pat luton #1
username and password verification
Hi guys hope someone will be in a position to help me.Am designing an online
banking system and i have a login page for existing customers.The username and
password details are already stored in the database.Therefore for existing
customers they will only need to go to the login page and fill out the username
and password, which will then be verified and if correct they are redirected to
another page.Unfortunately am getting the following error
Microsoft VBScript compilation (0x800A0411)
Name redefined
/projects/99098932/project/custlogin.asp, line 11, column 5
The following is my code could somebody please help me
<%@ Language = "VBScript" %>
<%
Option Explicit
Dim cnnLogin, rstLogin, strUsername, strpassword, strSQL
%>
<html>
<head><title>Login Page</title>
</head>
<%
Dim strSQL
Set objConn = Server.CreateObject("ADODB.Connection")
conString ="Provider = Microsoft.Jet.OLEDB.4.0; Data
Source=D:\web\projects\99098932\project\project.md b;"
objConn.Open conString
Set objRS = Server.CreateObject("ADODB.RecordSet")
strSQL = "SELECT * from Transaction where Username = '" & Request("Username")
strSQL = strSQL & "' and password = '" & Request("password") & "'"
objRS.Open strSQL, objConn
If Request.Form("password") > "" Then
If objRS.EOF Then
Response.Write "<font color=#ff0000><Center><b>**Failed
Login**</b></Center></font>"
Else
Response.Write "<font color=#008000><Center><b>**Successful
Login**</b></Center></font>"
End If
Else
Response.Write "<font color=#ff8000><Center><b>**No login
attempted**</b></Center></font>"
End If
objRS.close
objConn.close
Set objRS = Nothing
Set objConn = Nothing
'Else Session("Valid") = Request("Username")
'Response.Redirect("transaction.asp")
'End If
Response.Redirect("http://arrakis.luton.ac.uk/projects/99098932/project/transact
ion.asp")
%>
</body>
</html>
pat luton Guest
-
username and password
Hi all, My website host moved my site onto bigger servers and my ftp usermane and password had to be changed. Apparently the Contribute software... -
password/username
i have figured out how to "insert record' and when i fill in the text areas the page inserts the names into my database labeled passwords. what i... -
Username, Password, Pin
Hi, I would like to make a password protected page, whereby the user enters their username, password and pin. When the click the submit button, it... -
Password verification
I have a form (frmpassword) with an unbound text box (text0) I would like for the text box to verify the password against a table... -
Username and password?
Thanks for this but I keep getting directed to Dreamweaver UltraDev. Do I need this or can I do it with MX? northerncaller -
Chris In Madison #2
Re: username and password verification
Aftger Option Explicit, you're "DIM"ming strSQL. Then, after the </head>
tag, you're "DIM"ming it again. Hence the error. You could either use
"REDIM" or just drop the "DIM" altogether.
Best regards,
Chris
Chris In Madison Guest
-
CarlGrint #3
Re: username and password verification
You do know Dreamweaver has its own inbuilt Behaviour to do this..?
If not, check it out, save you time, re-inventing the wheel, and you can alter
the code if neccessary, but looking at your example it will do exactly what you
want.
Originally posted by: pat luton
Hi guys hope someone will be in a position to help me.Am designing an online
banking system and i have a login page for existing customers.The username and
password details are already stored in the database.Therefore for existing
customers they will only need to go to the login page and fill out the username
and password, which will then be verified and if correct they are redirected to
another page.Unfortunately am getting the following error
Microsoft VBScript compilation (0x800A0411)
Name redefined
/projects/99098932/project/custlogin.asp, line 11, column 5
The following is my code could somebody please help me
<%@ Language = "VBScript" %>
<%
Option Explicit
Dim cnnLogin, rstLogin, strUsername, strpassword, strSQL
%>
<html>
<head><title>Login Page</title>
</head>
<%
Dim strSQL
Set objConn = Server.CreateObject("ADODB.Connection")
conString ="Provider = Microsoft.Jet.OLEDB.4.0; Data
Source=D:\web\projects\99098932\project\project.md b;"
objConn.Open conString
Set objRS = Server.CreateObject("ADODB.RecordSet")
strSQL = "SELECT * from Transaction where Username = '" & Request("Username")
strSQL = strSQL & "' and password = '" & Request("password") & "'"
objRS.Open strSQL, objConn
If Request.Form("password") > "" Then
If objRS.EOF Then
Response.Write "<font color=#ff0000><Center><b>**Failed
Login**</b></Center></font>"
Else
Response.Write "<font color=#008000><Center><b>**Successful
Login**</b></Center></font>"
End If
Else
Response.Write "<font color=#ff8000><Center><b>**No login
attempted**</b></Center></font>"
End If
objRS.close
objConn.close
Set objRS = Nothing
Set objConn = Nothing
'Else Session("Valid") = Request("Username")
'Response.Redirect("transaction.asp")
'End If
Response.Redirect("http://arrakis.luton.ac.uk/projects/99098932/project/transact
ion.asp")
%>
</body>
</html>
CarlGrint Guest



Reply With Quote

