Results 1 to 2 of 2

Thread: VBscript as a front end to oracle

  1. #1

    Thread Starter
    Addicted Member Skeen's Avatar
    Join Date
    Jul 2000
    Location
    Abingdon, Oxon
    Posts
    138

    Talking

    Hiya everybody ("Hi Dr Nick....em Dr Skeen!"),

    I'm using oracle on NT for my database, and am embedding VBscript inside html for the front end ( checking Usr/Password etc). I've been scouting through a few books but as yet have had no joy!
    After a user has submitted username and password, once authenticated within the database I want the Vb script to direct the user to the main menu page. On clicking the submit button, that opens the connection to the database for usr/password validation but after that I don't know what to do! Any help would be greatly appreciated, my code is below ("standard" - he he, just a little computer humor - sorry, I'll get my coat)

    Cheers 'n' Beers

    Skeen

    <html>

    <head>

    <meta http-equiv="Content-Type"
    content="text/html; charset=iso-8859-1">
    <meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
    <title>Acquist Accounts</title>
    </head>

    <script language = "vbscript">

    function Get_Username

    Dim cnAcqAcc
    Dim cmAcqAcc
    Dim rsUserPassword
    Dim cmSQL
    Dim StoredPassword
    'On Error Resume Next

    Set cnAcqAcc = CreateObject ( "ADODB.Connection" )
    cnAcqAcc.ConnectionString = "Provider=MSDASQL;DSN=AqAc;UID=AcqAcc_owner;PWD=AcqAcc_owner;"
    cnAcqAcc.open

    User = document.frm1.T1.value
    MsgBox User

    Pass = document.frm1.T2.value
    MsgBox Pass

    cmSQL= "SELECT Password FROM UserPassword WHERE Username = '" & User & "' "

    Set rsUserPassword = cnAcqAcc.Execute( cmSQL )
    rsUserPassword.MoveFirst
    StoredPassword =rsUserPassword( "Password" )

    cnAcqAcc.Close
    Set rsCatagory = Nothing

    If StoredPassword = Pass Then
    MsgBox "Logged On"
    'execute "Main_menu_test.html"
    ElseIf StoredPassword <> Pass Then

    MsgBox "Get Stuffed"

    End if




    End function
    </script>

    <body bgcolor="#FFFFFF">

    <p>&nbsp;</p>

    <p>&nbsp;</p>

    <p align="center"><font size="7"><strong>Acquist Accounts</strong></font></p>

    <hr size="12" noshade color="#808000">

    <p>&nbsp;</p>

    <p><font color="#000000" size="4">Welcome to Acquist Accounts
    database. Please enter your Username and Password then click
    submit to access your account details. Use the mouse to click
    into the username field and then tab or click into the password
    field, then click submit. You can reset the page by clicking
    reset.</font></p>

    <p>&nbsp;</p>

    <form method="POST" onSubmit="Get_Username" name=frm1 >

    <p><font size="4">Enter Username: </font><input type="text" size="20" name="T1"></p>

    <p><font size="4">Enter Password: </font><input type="password" size="20" name="T2"></p>

    <p><input type="submit" name="B1" value="Submit" > <input type="reset" name="B2" value="Reset"></p>
    </form>
    </body>
    </html>


    "It wasn't the booze that made me snooze, It was the Gin that did me in!"

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    The Coroner? I'm so sick of that guy! (another Dr Nick quote )

    anyways...

    What do you mean, you don't know what to do? Do you want to change the page to the valid login page?

    I hope you are using script encoder to encode this script. Any bozo with half a brain will be able to view the source code of your script and easily bypass your "security"

Posting Permissions

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



Click Here to Expand Forum to Full Width