M
Mark
Hi,
I'm a newbie to ruby and web programming. I created a very simple html
form and set the action to "action=actionhandler.rb", after following an
example from a book. But when I click submit, instead of running
actionhandler.rb, my browser shows the source code of actionhandler.rb.
I'm running these things on Apache webserver. So where am I going wrong
? Do I need any additional plugins ? Any help would be greatly
appreciated.
My actionhandler.rb file looks as follows:
#!/usr/local/ruby/bin/ruby
require 'cgi'
cgi = CGI.new
puts cgi['name']
puts cgi['reason']
f= File.new("output","w")
f.puts cgi['name']
f.puts cgi['reason']
f.close
Thanks,
Mark
I'm a newbie to ruby and web programming. I created a very simple html
form and set the action to "action=actionhandler.rb", after following an
example from a book. But when I click submit, instead of running
actionhandler.rb, my browser shows the source code of actionhandler.rb.
I'm running these things on Apache webserver. So where am I going wrong
? Do I need any additional plugins ? Any help would be greatly
appreciated.
My actionhandler.rb file looks as follows:
#!/usr/local/ruby/bin/ruby
require 'cgi'
cgi = CGI.new
puts cgi['name']
puts cgi['reason']
f= File.new("output","w")
f.puts cgi['name']
f.puts cgi['reason']
f.close
Thanks,
Mark