5 Replies - 794 Views - Last Post: 20 December 2012 - 08:32 AM Rate Topic: -----

#1 Mackiinio   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 16-September 12

Is it possible to create a logIn Page...?

Posted 19 December 2012 - 12:59 PM

Is it possible to create a logIn page, whilst reading the information out of a file will usernames and passwords in it.
Data in file set out like this -----> 2
1
Username1
Password1
2
Username2
Password2

I was just wondering if this was possible in visual basic? and if so how would i come about to start the code, I have 2D arrays and that is how the data is stored in file. Its just baffled me a little.

Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: Is it possible to create a logIn Page...?

#2 DarenR   User is offline

  • D.I.C Lover

Reputation: 593
  • View blog
  • Posts: 3,823
  • Joined: 12-January 10

Re: Is it possible to create a logIn Page...?

Posted 19 December 2012 - 01:43 PM

why would you use a 2d array and not just a simple array for password and one for user name? create a query that will pull it from the sql tables and fill the arrays up to check the info.
Was This Post Helpful? 0
  • +
  • -

#3 billy_welsh   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 04-December 12

Re: Is it possible to create a logIn Page...?

Posted 19 December 2012 - 03:12 PM

TuT
Was This Post Helpful? 0
  • +
  • -

#4 AdamSpeight2008   User is offline

  • MrCupOfT
  • member icon

Reputation: 2298
  • View blog
  • Posts: 9,535
  • Joined: 29-May 08

Re: Is it possible to create a logIn Page...?

Posted 19 December 2012 - 03:19 PM

Storing the password alongside the ID is a very bad idea, and extremely bad if it in plain text.

Define or utilise a function that produces an hash of the password, store that.
Was This Post Helpful? 0
  • +
  • -

#5 Mackiinio   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 16-September 12

Re: Is it possible to create a logIn Page...?

Posted 20 December 2012 - 07:32 AM

billy_welsh, Thanks you but i'm using a .txt file. So it wouldn't work.
Was This Post Helpful? 0
  • +
  • -

#6 billy_welsh   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 04-December 12

Re: Is it possible to create a logIn Page...?

Posted 20 December 2012 - 08:32 AM

Not sure if this is the the best method but I use IO.Streamreader to pull data from .txt files. Something like this but instead of sending it to a textbox you'll have to parse the data to extract the password.

        Dim oRead As System.IO.StreamReader
        Dim fFile As New IO.FileInfo(Environment.CurrentDirectory & "magicsecretpass.txt")
        Dim EntireFile As String
        oRead = IO.File.OpenText(Environment.CurrentDirectory & "magicsecretpass.txt")
        EntireFile = oRead.ReadToEnd()
        TextBox1.Text = EntireFile



Was This Post Helpful? 0
  • +
  • -

Page 1 of 1