username and password verification

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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...
    4. 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...
    5. 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
  3. #2

    Default 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

  4. #3

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139