From: Adam Kennedy Date: 2013-01-18T00:31:39+09:00 Subject: Re: Adding file directory automatically EDIT: Complete working code for adding bid to a file: #!/media/Apache/ruby/bin/ruby #!/usr/local/bin/ruby #Adds information from david.txt to an array f = File.open("../logs/david.txt") a = f.readlines #Sets params for form data require 'cgi' cgi = CGI.new() bid = cgi.params['bid'] a[2] = bid File.open('../logs/david.txt', 'w') { |f| f.puts a[0] f.puts a[1] f.puts a[2] f.puts a[3] } puts "Content-type: text/html\n\n" puts "" puts "" puts "Thank you" puts "" puts "" puts "

Thank you for your bid, it will now be logged and you will be redirected now.

" puts "" puts "" -- Posted via http://www.ruby-forum.com/.