cutekate 0 Newbie Poster

I am posting form data into a file and also on the web page. Could please tell me how do i do that with ruby. This is my code for html form

#!/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