Posting form data into file and onto webpage

YasminR20 Nov 2009 6:30 PM
Could you please tell me how do I post form data onto web page and also write into the file using ruby. This is my html form code:
#!/usr/bin/ruby
print "Content-type:text/html\n\n";
# Display the form
print <<HTML;
<html>
<body>
<form action="form1.rb" method="post">
<p>Your Name:<input type="text" name="name"></p>
<input type="submit" name="submit" value="Submit">
</form>
</body></html>
HTML

Thanks
Dustin Whittle22 Dec 2009 1:34 PM
QUOTE (YasminR @ Nov 20 2009, 06:30 PM) <{POST_SNAPBACK}>
Could you please tell me how do I post form data onto web page and also write into the file using ruby. This is my html form code:
#!/usr/bin/ruby
print "Content-type:text/html\n\n";
# Display the form
print <<HTML;
<html>
<body>
<form action="form1.rb" method="post">
<p>Your Name:<input type="text" name="name"></p>
<input type="submit" name="submit" value="Submit">
</form>
</body></html>
HTML

Thanks


Here is a good tutorial for getting started with ruby for web applications: http://guides.rubyonrails.org/getting_started.html