From: Kent Dahl Date: 2001-11-28T15:50:30+09:00 Subject: [ruby-talk:26747] Re: HTML parameters > Bhagavatheeswaran Mahadevan wrote: > > Can you pass HTML parameters and capture the values in Ruby as you do > in ASP??? > For example, when I submit a form can I capture the values of that > form?? > Can anyone please help me with a sample code for that......... I'm assuming you mean get the CGI forms parameters? Here is a small CGI script: #!/store/bin/ruby require "cgi" print "Content-type: text/html\r\n\r\n" print "

Hello World!

" cgi = CGI.new print "X=" print cgi['x'] print "

...end...'

" print "\r\n"
.... which I then surfed to with parameters like this: http://www.somewhere.no/cgi-bin/test.cgi?x=5 -- <[ Kent Dahl ]>================<[ http://www.stud.ntnu.no/~kentda/ ]> )____(stud.techn.;ind.�k.data)||(softwareDeveloper.at(Trustix))_( /"Opinions expressed are mine and not those of my Employer, "\ ( "the University, my girlfriend, stray cats, banana fruitflies, " ) \"nor the frontal lobe of my left cerebral hemisphere. "/