Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/local/ruby-1.9.2/bin/ruby
- require "cgi"
- cgi = CGI.new()
- username = cgi["username"]
- password = cgi["password"]
- users = File.open('../htdocs/files/login.txt','r') do |file|
- while(line = file.gets) do
- if line.split('//')[0] == username
- puts "username match found"
- else do
- puts "no match"
- end
- end
- # Close the file
- users.close
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement