Reply to this topicStart new topic
Posting form data into file and onto webpage
YasminR
post Nov 20 2009, 06:30 PM
Post #1
Group: Members
Posts: 1



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
Go to the top of the page
 
+Quote Post
Dustin Whittle
post Dec 22 2009, 01:34 PM
Post #2
Group: Yahoos
Posts: 113



QUOTE (YasminR @ Nov 20 2009, 06: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


Here is a good tutorial for getting started with ruby for web applications: http://guides.rubyonrails.org/getting_started.html
Go to the top of the page
 
+Quote Post
« Next Oldest · Ruby Development · Next Newest »
 

Reply to this topicStart new topic

 



rss YDN Forum RSS feeds

YDN Content Copyright © 2010 Yahoo! Inc. All rights reserved. Copyright | Privacy Policy

Help us continue to improve the Yahoo! Developer Network - Send Your Suggestions