From: falcon Date: 2002-03-19T01:44:30+09:00 Subject: Re: Retrival of parameters from POST forms But the odd thing is: When I checked the size of paramList using paramList.length, it simply returned false. Any thought of it? Thanks. rubydev.deweerdt wrote: >>Hi, >> I'm a newbie of Ruby. I'm working on a development of websites with >>eRuby. When I tried to use CGI object to read parameters passed by a >>form using POST method, nothing was returned. >> Here's the form page: >> >>
>> >> >> >>
>> >> And the following are codes for results.rhtml >> >> >> <% require "cgi" >> cgi = CGI.new >> paramList = cgi.params >> print paramList['id'] + "\n" >> print paramList['user'] + "\n" >> %> >> >> >> >> Any suggestions are greatly appreciated. >> >> >> > I suppose you get an error ? > One way to do what you intended to maybe : > > <% require "cgi" > cgi = CGI.new > paramList = cgi.params > cgi.out { > cgi.html { > "#{paramList['id']}
#{paramList['user']}" > } > } > %> > > Try for more information > http://www.rubycentral.com/articles/cgi.html > > Regards, > F.Deweerdt > > "Acc�dez au courrier �lectronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,13 EUR/mn) ; t�l : 08 92 68 13 50 (0,34EUR/mn)" > > >