Typically, you'd never write the program that way in Ruby. All the popular ruby web frameworks are not continuation or closure based. Instead, you'd keep the state in memory on the server, tied to the session. You'd also use three templates, one per page. In Rails:
def said
if request.method == :post
session[:said] = params[:said]
render :action => "clickhere"
else
render :action => "result" if session[:said]
end
end
default template said.rhtml:
<% form_tag do %><%= text_field_tag "said", "" %><%= submit_tag %><% end %>
clickhere.rhtml:
<%= link_to "click here", "" %>
result.rhtml:
You said <%= session[:said] %>
But now that you mention it, ruby has callcc...let me see what that implies...
Neat, thanks. (Not quite "right" since I can change &foo=myinput on page 2, but I'm guessing that could easily be fixed with an extra closure somewhere).