From: "Will H." Date: 2010-01-21T22:09:26+09:00 Subject: Re: Sending form data to a text file Will H. wrote: > #!/usr/local/bin/ruby > > require 'cgi' > cgi = CGI.new > > time1 = Time.new > forename = cgi.params['username'] = ["value"] > password = cgi.params['password'] = ["value"] > email = cgi.params['email'] = ["value"] > age = cgi.params['age'] = ["value"] > gender = cgi.params['gender'] = ["value"] > > open('../logs/visitor_log', 'a') { |f| > f.puts forename > f.puts password > f.puts email > f.puts age > f.puts gender > f.puts time1.inspect > } > > I have changed the variables to cgi.params, and I have looked at the > ruby documentation but I still don't see how I can get the program to > work. If anyone has the same problem, I have got the program working by removing = ["value"] from cgi.params visitor_log output: will Password will@example.net 22 Male 2010-01-21 12:55:47 +0000 -- Posted via http://www.ruby-forum.com/.