Results 1 to 31 of 31

Thread: Making Login Restriction

  1. #1

    Thread Starter
    Fanatic Member bloodsside14's Avatar
    Join Date
    Mar 2009
    Location
    Mid Town of Prontera
    Posts
    527

    Making Login Restriction

    Hi guy's i am using vb6 and sql server 2000 and i create my login form and already connected to the sql i am wondering how to make some restriction on login. Sample when i login Admin i can access everything in form2 but when i login kobe some buttons or textbox i can't access. How could i do that? Need a big help guy's
    ___________________



    Give some REP. if my POST is helpful

  2. #2
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Making Login Restriction

    Define a Global Boolean variable in your module and set them to true when there is an admin login and set them to false when user logs in. Depending upon that variable enable/disable you buttons/text box
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  3. #3

    Thread Starter
    Fanatic Member bloodsside14's Avatar
    Join Date
    Mar 2009
    Location
    Mid Town of Prontera
    Posts
    527

    Re: Making Login Restriction

    Quote Originally Posted by koolsid View Post
    Define a Global Boolean variable in your module and set them to true when there is an admin login and set them to false when user logs in. Depending upon that variable enable/disable you buttons/text box

    How to do that sir? I have no idea sorry for that
    ___________________



    Give some REP. if my POST is helpful

  4. #4
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: Making Login Restriction

    I suggest setting up database roles for access and check those instead of hardcoding IDs.

  5. #5
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Making Login Restriction

    Hi...

    Check the example attached....
    Attached Files Attached Files

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  6. #6
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: Making Login Restriction

    It's more work and some research but if this is an application of any substance and will reside in a commercial production environment learn to use DB roles versus hardcoding IDs as in the example by akhileshbc. If it is something small and just controled by you the example is fine.

  7. #7
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Making Login Restriction

    @TysonLPrice: Can you give me a small example description regarding DB roles ?

    Thanks..

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  8. #8

    Thread Starter
    Fanatic Member bloodsside14's Avatar
    Join Date
    Mar 2009
    Location
    Mid Town of Prontera
    Posts
    527

    Re: Making Login Restriction

    Quote Originally Posted by akhileshbc View Post
    Hi...

    Check the example attached....
    Thank's for the info sir but what if my user and password are stored in my datatabase and not on my form. How to restrict it? Same as you do?
    ___________________



    Give some REP. if my POST is helpful

  9. #9
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Making Login Restriction

    Quote Originally Posted by bloodsside14 View Post
    How to do that sir? I have no idea sorry for that
    Ok. Here is a very basic example. Amend it as per your requirements
    Attached Files Attached Files
    Last edited by Siddharth Rout; Jun 16th, 2010 at 01:14 PM. Reason: Uploaded a .zip version
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  10. #10
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Making Login Restriction

    It is generally more beneficial to post ZIP files. RAR support isn't available in Windows and many users don't see a reason to pay for and install it.

  11. #11

    Thread Starter
    Fanatic Member bloodsside14's Avatar
    Join Date
    Mar 2009
    Location
    Mid Town of Prontera
    Posts
    527

    Re: Making Login Restriction

    Quote Originally Posted by koolsid View Post
    Ok. Here is a very basic example. Amend it as per your requirements
    inside the list box i will get it the content on the sql?
    ___________________



    Give some REP. if my POST is helpful

  12. #12
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: Making Login Restriction

    Quote Originally Posted by akhileshbc View Post
    @TysonLPrice: Can you give me a small example description regarding DB roles ?

    Thanks..
    Got to work right now

    I'll get back to you...

  13. #13
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Making Login Restriction

    @BS: You you can
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  14. #14
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Making Login Restriction

    Quote Originally Posted by bloodsside14 View Post
    Thank's for the info sir but what if my user and password are stored in my datatabase and not on my form. How to restrict it? Same as you do?
    In the login form, try the username and password checking using data from your database. Then, assign the user role based on that user.

    @TysonLPrice: That's ok. I'll wait

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  15. #15

    Thread Starter
    Fanatic Member bloodsside14's Avatar
    Join Date
    Mar 2009
    Location
    Mid Town of Prontera
    Posts
    527

    Re: Making Login Restriction

    Quote Originally Posted by akhileshbc View Post
    In the login form, try the username and password checking using data from your database. Then, assign the user role based on that user.

    @TysonLPrice: That's ok. I'll wait
    I cant get what you say sir please clarify me what to do. sorry for that
    ___________________



    Give some REP. if my POST is helpful

  16. #16
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Making Login Restriction

    Quote Originally Posted by bloodsside14 View Post
    I cant get what you say sir please clarify me what to do. sorry for that
    It will be something like this (for example):
    Code:
    Option Explicit
    
    Private Sub cmdOK_Click()
        '~~~ Add reference to Microsoft ActiveX Data Objects 2.x Library
        '~~~ We are going to check the database for the entered username and password. You need to make the necessary changes to suit your needs
        Dim cn As ADODB.Connection
        Dim rs As ADODB.Recordset
        Set cn = New ADODB.Connection
        cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
          "Data Source= " & App.Path & "\database.mdb;Persist Security Info=False;Jet OLEDB:Database Password=myDBpassword;"
        cn.Open
        Set rs = New ADODB.Recordset
        rs.Open "SELECT * FROM all_users WHERE user_name = '" & Trim$(txtUserName.Text) & "' AND password = '" & txtPassword.Text & "'", cn, adOpenForwardOnly, adLockReadOnly
        
        If rs.EOF = False Then
            Select Case LCase$(txtUserName.Text)
                Case "admin"
                    myUser = user_Admin
                    Form1.Show
                    Unload frmLogin
                    Exit Sub
                Case "guest"
                    myUser = user_Guest
                    Form1.Show
                    Unload frmLogin
                    Exit Sub
                Case "normal"
                    myUser = user_Normal
                    Form1.Show
                    Unload frmLogin
                    Exit Sub
            End Select
        End If
        
        MsgBox "Invalid Password, try again!", , "Login"
        txtPassword.SetFocus
        SendKeys "{Home}+{End}"
    
    End Sub
    You need to read the articles and tutorials in our Database Development FAQ section to know more about database manipulation.

    Good luck...

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  17. #17

    Thread Starter
    Fanatic Member bloodsside14's Avatar
    Join Date
    Mar 2009
    Location
    Mid Town of Prontera
    Posts
    527

    Re: Making Login Restriction

    why your getting this?

    Code:
    Code:
    "Data Source= " & App.Path & "\database.mdb;Persist Security Info=False;Jet OLEDB:Database Password=myDBpassword;"
    ___________________



    Give some REP. if my POST is helpful

  18. #18
    PowerPoster Spoo's Avatar
    Join Date
    Nov 2008
    Location
    Right Coast
    Posts
    2,656

    Re: Making Login Restriction

    Quote Originally Posted by dilettante View Post
    It is generally more beneficial to post ZIP files. RAR support isn't available in Windows and many users don't see a reason to pay for and install it.
    Dilettante

    I agree.

    Spoo

  19. #19
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Making Login Restriction

    @dilettante: Uploaded a .Zip file
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  20. #20
    PowerPoster Spoo's Avatar
    Join Date
    Nov 2008
    Location
    Right Coast
    Posts
    2,656

    Re: Making Login Restriction

    Kool

    Thnx

    Spoo

  21. #21
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Making Login Restriction

    Quote Originally Posted by bloodsside14 View Post
    why your getting this?

    Code:
    Code:
    "Data Source= " & App.Path & "\database.mdb;Persist Security Info=False;Jet OLEDB:Database Password=myDBpassword;"
    Read the articles in here: http://www.vbforums.com/showthread.php?t=337051#ado, particularly this tutorial: http://www.vbforums.com/showthread.php?t=551154...

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  22. #22

    Thread Starter
    Fanatic Member bloodsside14's Avatar
    Join Date
    Mar 2009
    Location
    Mid Town of Prontera
    Posts
    527

    Re: Making Login Restriction

    Your using there a MS Access right?
    ___________________



    Give some REP. if my POST is helpful

  23. #23

    Thread Starter
    Fanatic Member bloodsside14's Avatar
    Join Date
    Mar 2009
    Location
    Mid Town of Prontera
    Posts
    527

    Re: Making Login Restriction

    vb Code:
    1. Private Sub cmbUser_Click()
    2.     If cmbUser.ListCount = 0 Then Exit Sub
    3.     Me.cmdDatabaseFiles.Enabled = True
    4.     Me.cmdFilesDatabase.Enabled = True
    5.     Me.cmdChkProfile.Enabled = True
    6.    
    7. End Sub
    8. Private Sub getUser()
    9.  
    10.     On Error GoTo ErrHandler
    11.     set_rec_getData "SELECT username FROM tblUser", rs, cn
    12.    
    13.  
    14.     Do While Not rs.EOF
    15.         Me.cmbUser.AddItem Trim$(rs("username"))
    16.         rs.MoveNext
    17.     Loop
    18.        
    19.    
    20.     If cmbUser.ListCount <> 0 Then cmbUser.ListIndex = 0
    21.    
    22.     rs.Close
    23.     Set rs = Nothing
    24.  
    25. Exit Sub
    26. ErrHandler:
    27.     MsgBox "Error: " & Err.Description & vbNewLine & "Error Number: " & Err.Number, vbCritical
    28. End Sub


    I am using this codes to show the values in combo box but when i run it nothing happens i did not get anything to the database.
    ___________________



    Give some REP. if my POST is helpful

  24. #24
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Making Login Restriction

    Quote Originally Posted by bloodsside14 View Post
    Your using there a MS Access right?
    Yes..

    Quote Originally Posted by bloodsside14 View Post
    I am using this codes to show the values in combo box but when i run it nothing happens i did not get anything to the database.
    Then, you have to provide us more details for checking that issue. Like the sub that deals with the database (set_rec_getData) and other things.
    ....

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  25. #25

    Thread Starter
    Fanatic Member bloodsside14's Avatar
    Join Date
    Mar 2009
    Location
    Mid Town of Prontera
    Posts
    527

    Re: Making Login Restriction

    i don't have any sub sir
    ___________________



    Give some REP. if my POST is helpful

  26. #26
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Making Login Restriction

    Quote Originally Posted by bloodsside14 View Post
    i don't have any sub sir
    Ok. Where's the connection ? Have you dealt with database before ?
    Does it show any errors ? Did you checked your database - i mean, does it have any records ?

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  27. #27

    Thread Starter
    Fanatic Member bloodsside14's Avatar
    Join Date
    Mar 2009
    Location
    Mid Town of Prontera
    Posts
    527

    Re: Making Login Restriction

    there is a record there for sure and set a primary key. Not showing any errors, run smoothly but no records in combo box.
    ___________________



    Give some REP. if my POST is helpful

  28. #28

    Thread Starter
    Fanatic Member bloodsside14's Avatar
    Join Date
    Mar 2009
    Location
    Mid Town of Prontera
    Posts
    527

    Re: Making Login Restriction

    Now i can connect to my datatabse using this codes

    vb Code:
    1. Dim rs As New ADODB.Recordset
    2. If Trim(Combo1.Text) <> "" And Trim(txtpass.Text) <> "" Then
    3. If cnn.State <> adStateOpen Then cnn.Open
    4. rs.CursorLocation = adUseClient
    5. rs.Open "SELECT * FROM tblUser WHERE username='" & Trim(Combo1.Text) & "' AND password='" & Trim(txtpass.Text) & "'", cnn, adOpenStatic, adLockReadOnly
    6.  
    7. If Not rs.EOF Then
    8. Combo1.Enabled = False
    9.         txtpass.Enabled = False
    10.         Label1.Enabled = False
    11.         Label2.Enabled = False
    12.         cmdOK.Enabled = False
    13.         cmdCancel.Enabled = False
    14.        
    15.         Form2.Show
    16.         Form1.Hide
    17.  
    18.  Else
    19. MsgBox "The username and password that you provided" & vbCrLf & "are not found in the database.", vbApplicationModal + vbInformation, _
    20.         "Invalid Admin"
    21.         Combo1.Text = ""
    22.         txtpass.Text = ""
    23.         Combo1.SetFocus
    24. End If
    25. rs.Close
    26. Set rs = Nothing
    27. cnn.Close
    28. Else
    29. MsgBox "Required admin details are missing.", vbApplicationModal + vbExclamation, "Missing Information"
    30. Combo1.SetFocus
    31. End If
    32. End Sub


    and this is my connection to dbase

    vb Code:
    1. Option Explicit
    2. Public cnn As New ADODB.Connection
    3. Public strConnection As String
    4. Public strAccess As String
    5.  
    6.  
    7.  
    8. strConnection = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MIAA;Data Source=PAULO\MONTEALEGRE"
    9.  
    10. cnn.ConnectionString = strConnection
    11. cnn.Open
    12. Dim rs As New ADODB.Recordset
    13. If cnn.State <> adStateOpen Then cnn.Open
    14. rs.Open "SELECT username FROM tblUser", cnn, adOpenStatic, adLockReadOnly
    15. If Not rs.EOF Then
    16.     Do While Not rs.EOF
    17.            Combo1.AddItem Trim(rs!username)
    18.        rs.MoveNext
    19.     Loop
    20. rs.Close
    21.     Set rs = Nothing
    22. End If



    The only thing i need is to put an restriction how to connect it to my dbase the code that you give.
    vb Code:
    1. If Len(Trim(Combo1.Text)) = 0 Or Len(Trim(Text1.Text)) = 0 Then
    2.         MsgBox "Please select username and enter the password"
    3.         Exit Sub
    4.     End If
    5.    
    6.     strUser = Combo1.Text
    7.    
    8.     Select Case strUser
    9.    
    10.     Case "Administrator"
    11.         If Text1.Text = "1" Then
    12.             boolAdmin = True
    13.             Form2.Show
    14.             Unload Me
    15.         End If
    16.     Case "User1"
    17.         If Text1.Text = "2" Then
    18.             Form2.Show
    19.             Unload Me
    20.         End If
    21.     End Select
    22. End Sub
    23.  
    24.  
    25.  
    26. Public boolAdmin As Boolean
    27. Public strUser As String
    ___________________



    Give some REP. if my POST is helpful

  29. #29
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: Making Login Restriction

    Use this as your user name (using a text box) and anything for the password:

    ' or 1=1 ---

    Then have a look here http://articles.sitepoint.com/articl...n-attacks-safe

    Your safe because of you combo box but since you are looking at log on procedures you should be aware of injection attacks if you are not already.
    Last edited by TysonLPrice; Jun 21st, 2010 at 04:54 AM.

  30. #30

    Thread Starter
    Fanatic Member bloodsside14's Avatar
    Join Date
    Mar 2009
    Location
    Mid Town of Prontera
    Posts
    527

    Re: Making Login Restriction

    i am doing my user as a combo box. getting the user name in database.
    ___________________



    Give some REP. if my POST is helpful

  31. #31
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: Making Login Restriction

    Quote Originally Posted by bloodsside14 View Post
    i am doing my user as a combo box. getting the user name in database.
    Try this as your password:

    ' or 1=1 or 1 = '

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