<% require 'cgi' # Require the CGI library cgi = CGI.new() # New CGI object username = cgi.param('username') %><html><head><title>eRuby Test</title></head> <body> <h1>Testing eRuby</h1> <% if username.empty? # Print out the form asking for the username %> <form method="post"> Please enter your username: <input type="text" name="username"><br> <input type="submit" value="Go"> </form> <% else %> Welcome <%= username %>! <% end %> </body> </html>