I''m working on a rails app where some of the content is located in
"static" rhtml files. How should I access form parameters in these
files so that something like the following will work(simply checking
whether a form has been submitted):
<%
require ''cgi''
cgi = CGI.new
if cgi[''myquery_input_submit''] == ''1''
test = 1
else
test = ''none''
end
%>
<%= test %>
<%= ''my input'' +
cgi[''myquery_input_submit''].to_s%>
<form action="http://127.0.0.1/~josephmoore/testForm.rhtml"
method="post" accept-charset="utf-8">
<div>
<textarea name="myquery" rows="8"
cols="40"></textarea>
<br />
<input type="submit" value="Submit" />
<input type="hidden" name="myquery_input_submit"
value="1" />
</div>
</form>
Thanks
--
Posted via http://www.ruby-forum.com/.