0

I have created HTML form asking for username and password and I have one .txt file containing many username and password. I need to check wheather the entered username and password is present in .txt file using javascript.

Please help me out.

  • 2
    Security at it's finest :P . Please post what you've tried thus far, and then we can better help you out. –  Feb 08 '15 at 07:01
  • 1
    I sort of don't even want to help, in case this might make it into some production code somewhere. – John Green Feb 08 '15 at 07:05
  • I am new to javascript. Just i created login form with username and password.... I dont know how to check the entered username and password is present in .txt file. – vidyashree pl Feb 08 '15 at 07:08

1 Answers1

0

First, you don't use any client side scripting (i.e. javascriptvin a browser) for security. Ever.

Next, don't save your password plaintext in a txt.

If you really want to create a secure login, try out an .htaccess (see this question Password protecting a directory and all of it's subfolders using .htaccess ) or a php form. I think an .htaccess would suit you better, as it's much easier to setup and doesn't require any coding.

Community
  • 1
  • 1
user1950929
  • 874
  • 1
  • 9
  • 17