Creating a Login Text file

Please support our VB.NET advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Aug 2008
Posts: 126
Reputation: laghaterohan is an unknown quantity at this point 
Solved Threads: 1
laghaterohan laghaterohan is offline Offline
Junior Poster

Creating a Login Text file

 
0
  #1
Sep 2nd, 2008
i want to create a login text file at each login , that will be stored in system folder that can be viewed but not modified....so that the person who logged last can be traced...

here is my code : Is the code correct ??? if not what are the modifications ? i get a file created but am some how not convinced....

FILENAME = "LOGIN.TXT"

FileOpen(1, "LOGIN.TXT", OpenMode.Append)
WriteLine(1, username, password, role)
FileClose(1)

cya
Rohan
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 16
Reputation: lukechris is an unknown quantity at this point 
Solved Threads: 0
lukechris lukechris is offline Offline
Newbie Poster

Re: Creating a Login Text file

 
0
  #2
Sep 4th, 2008
So you would like to use the "login.txt" file as the place where the username and password are stored?

That's not very good login system, anyone could search the computer for login (which is quite obvious). Try renaming the file to something completely random i.e. "4ty47rhegi.txt"

As far as the code goes you used
FILENAME = "LOGIN.TXT"

FileOpen(1, "LOGIN.TXT", OpenMode.Append)
WriteLine(1, username, password, role)
FileClose(1)

My amendment's for you are simply follow this person's tutorial Here. Its so simple and goes right into depth, I take no credit and pass it all onto him
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 126
Reputation: laghaterohan is an unknown quantity at this point 
Solved Threads: 1
laghaterohan laghaterohan is offline Offline
Junior Poster

Re: Creating a Login Text file

 
0
  #3
Sep 5th, 2008
thanks but can i get a proper code for d same ? i am unable to watch video properly prob. due to my slow connection....can u plz help me out soon ! cya, wating for ur reply


Originally Posted by lukechris View Post
So you would like to use the "login.txt" file as the place where the username and password are stored?

That's not very good login system, anyone could search the computer for login (which is quite obvious). Try renaming the file to something completely random i.e. "4ty47rhegi.txt"

As far as the code goes you used
FILENAME = "LOGIN.TXT"

FileOpen(1, "LOGIN.TXT", OpenMode.Append)
WriteLine(1, username, password, role)
FileClose(1)

My amendment's for you are simply follow this person's tutorial Here. Its so simple and goes right into depth, I take no credit and pass it all onto him
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 16
Reputation: lukechris is an unknown quantity at this point 
Solved Threads: 0
lukechris lukechris is offline Offline
Newbie Poster

Re: Creating a Login Text file

 
0
  #4
Sep 7th, 2008
Originally Posted by laghaterohan View Post
thanks but can i get a proper code for d same ? i am unable to watch video properly prob. due to my slow connection....can u plz help me out soon ! cya, wating for ur reply
Hi sorry your waiting on my reply

Right.

I will write the code for you now, ok, so
textbox1 is username field, textbox2 is password

This is the code for the button (Login button)
  Dim password As String
        Dim username As String
        password = "yourpassword"
        username = "yourusername"
        If TextBox1.Text = username And textbox2.text = password Then
            form2.show()
            Me.Close()
        ElseIf TextBox1.Text = username = False Then
            MsgBox("Wrong username", MsgBoxStyle.Critical)
        ElseIf textbox2.text = password = False Then
            MsgBox("Wrong password", MsgBoxStyle.Critical)
        ElseIf TextBox1.Text = username = False And textbox2.text = password = False Then
            MsgBox("Wrong username and password", MsgBoxStyle.Critical)
        End If
yourusername = Should be changed to your username
yourpassword = Should be changed to your password
form2.show = The form you want to show when the correct username and password are entered

Sorry for the late reply, any probs/questions let me know
Also let me know if it works as well lol

Thanks,
Luke

also you could have a change login button which would work by overwriting the other login

Code for change login button:
username = TextBox1.Text
password = textbox2.text
Last edited by lukechris; Sep 7th, 2008 at 1:04 pm.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 126
Reputation: laghaterohan is an unknown quantity at this point 
Solved Threads: 1
laghaterohan laghaterohan is offline Offline
Junior Poster

Re: Creating a Login Text file

 
0
  #5
Sep 9th, 2008
thanks a lot for ur response....

Btw...do u hv ne info about listview option in vb.net.... ?? i want to create attendance form
in which when i select a particular date all admission id , names should be listed and then besides them there should be a check box where in i can check/uncheck depending upon present or absent ? how to do it ?? is list view option gud or check box in datagrid ??? i dont know about both of dem ?? can u help me out ?? plzzz
Originally Posted by lukechris View Post
Hi sorry your waiting on my reply

Right.

I will write the code for you now, ok, so
textbox1 is username field, textbox2 is password

This is the code for the button (Login button)
  Dim password As String
        Dim username As String
        password = "yourpassword"
        username = "yourusername"
        If TextBox1.Text = username And textbox2.text = password Then
            form2.show()
            Me.Close()
        ElseIf TextBox1.Text = username = False Then
            MsgBox("Wrong username", MsgBoxStyle.Critical)
        ElseIf textbox2.text = password = False Then
            MsgBox("Wrong password", MsgBoxStyle.Critical)
        ElseIf TextBox1.Text = username = False And textbox2.text = password = False Then
            MsgBox("Wrong username and password", MsgBoxStyle.Critical)
        End If
yourusername = Should be changed to your username
yourpassword = Should be changed to your password
form2.show = The form you want to show when the correct username and password are entered

Sorry for the late reply, any probs/questions let me know
Also let me know if it works as well lol

Thanks,
Luke

also you could have a change login button which would work by overwriting the other login

Code for change login button:
username = TextBox1.Text
password = textbox2.text
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 126
Reputation: laghaterohan is an unknown quantity at this point 
Solved Threads: 1
laghaterohan laghaterohan is offline Offline
Junior Poster

Re: Creating a Login Text file

 
0
  #6
Sep 9th, 2008
hey but is code is not about creating a login text file...i mean at each login i want a text file to be created in the system...which admin can check out....do u hv ne idea about i...btw i hve written code ias above (check above) is correct ??
cya
Reply sn,
Rohan

Originally Posted by lukechris View Post
Hi sorry your waiting on my reply

Right.

I will write the code for you now, ok, so
textbox1 is username field, textbox2 is password

This is the code for the button (Login button)
  Dim password As String
        Dim username As String
        password = "yourpassword"
        username = "yourusername"
        If TextBox1.Text = username And textbox2.text = password Then
            form2.show()
            Me.Close()
        ElseIf TextBox1.Text = username = False Then
            MsgBox("Wrong username", MsgBoxStyle.Critical)
        ElseIf textbox2.text = password = False Then
            MsgBox("Wrong password", MsgBoxStyle.Critical)
        ElseIf TextBox1.Text = username = False And textbox2.text = password = False Then
            MsgBox("Wrong username and password", MsgBoxStyle.Critical)
        End If
yourusername = Should be changed to your username
yourpassword = Should be changed to your password
form2.show = The form you want to show when the correct username and password are entered

Sorry for the late reply, any probs/questions let me know
Also let me know if it works as well lol

Thanks,
Luke

also you could have a change login button which would work by overwriting the other login

Code for change login button:
username = TextBox1.Text
password = textbox2.text
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 1764 | Replies: 5
Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC