Is name set in cgi : CGI Form « CGI « Ruby

Is name set in cgi

<head><title>Test Form</title></head> 
I like Ruby because: 
<form target="cgibin/survey.rb"> 
<input type="checkbox" name="reason" value="flexible" /> 
It's flexible<br /> 
<input type="checkbox" name="reason" value="transparent" /> 
It's transparent<br /> 
<input type="checkbox" name="reason" value="perlish" /> 
It's like Perl<br /> 
<input type="checkbox" name="reason" value="fun" /> 
It's fun 
Your name: <input type="text" name="name"> 
<input type="submit"/> 

# survey.rb

require 'cgi' 
cgi = 
cgi.has_key?('name') # true 
cgi.has_key?('age') # false 


Related examples in the same category

1.Pass value from a form to CGI scropt
2.Create a Page in HTML for Accepting the Customer Information
3.Get value from a form
4.Post a message